mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 12:14:02 +01:00
decouple setConfig() method
This commit is contained in:
parent
4fb5179ace
commit
bf61bed251
@ -70,8 +70,7 @@ final class TemplateAnnotationRector extends AbstractRector
|
||||
BetterNodeFinder $betterNodeFinder,
|
||||
TemplateGuesser $templateGuesser
|
||||
) {
|
||||
$this->ensureConfigHasVersion($config);
|
||||
$this->version = $config['version'];
|
||||
$this->setConfig($config);
|
||||
$this->docBlockAnalyzer = $docBlockAnalyzer;
|
||||
$this->methodCallNodeFactory = $methodCallNodeFactory;
|
||||
$this->nodeFactory = $nodeFactory;
|
||||
@ -172,6 +171,15 @@ final class TemplateAnnotationRector extends AbstractRector
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $config
|
||||
*/
|
||||
private function setConfig(array $config): void
|
||||
{
|
||||
$this->ensureConfigHasVersion($config);
|
||||
$this->version = $config['version'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $config
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user