/**
* {@inheritdoc}
*/
public function run(ContextInterface $context)
{
$files = $context->getFiles()->name('*.json');
if (0 === count($files)) {
return;
}
$config = $this->getConfiguration();
$this->linter->setDetectKeyConflicts($config['detect_key_conflicts']);
$lintErrors = $this->lint($files);
if ($lintErrors->count()) {
throw new RuntimeException($lintErrors->__toString());
}
}