This commit is contained in:
TomasVotruba 2018-02-13 22:24:34 +01:00
parent 5ec341e68f
commit a80d125877
1 changed files with 16 additions and 13 deletions

View File

@ -89,19 +89,6 @@ final class ArgumentReplacerRecipe
);
}
private static function ensureHasKey(array $data, string $key): void
{
if (isset($data[$key])) {
return;
}
throw new InvalidRectorConfigurationException(sprintf(
'Configuration for "%s" Rector should have "%s" key, but is missing.',
ArgumentReplacerRector::class,
$key
));
}
public function getClass(): string
{
return $this->class;
@ -138,6 +125,22 @@ final class ArgumentReplacerRecipe
return $this->replaceMap;
}
/**
* @param mixed[] $data
*/
private static function ensureHasKey(array $data, string $key): void
{
if (isset($data[$key])) {
return;
}
throw new InvalidRectorConfigurationException(sprintf(
'Configuration for "%s" Rector should have "%s" key, but is missing.',
ArgumentReplacerRector::class,
$key
));
}
/**
* @param mixed[] $data
*/