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,
|
BetterNodeFinder $betterNodeFinder,
|
||||||
TemplateGuesser $templateGuesser
|
TemplateGuesser $templateGuesser
|
||||||
) {
|
) {
|
||||||
$this->ensureConfigHasVersion($config);
|
$this->setConfig($config);
|
||||||
$this->version = $config['version'];
|
|
||||||
$this->docBlockAnalyzer = $docBlockAnalyzer;
|
$this->docBlockAnalyzer = $docBlockAnalyzer;
|
||||||
$this->methodCallNodeFactory = $methodCallNodeFactory;
|
$this->methodCallNodeFactory = $methodCallNodeFactory;
|
||||||
$this->nodeFactory = $nodeFactory;
|
$this->nodeFactory = $nodeFactory;
|
||||||
@ -172,6 +171,15 @@ final class TemplateAnnotationRector extends AbstractRector
|
|||||||
return $arguments;
|
return $arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed[] $config
|
||||||
|
*/
|
||||||
|
private function setConfig(array $config): void
|
||||||
|
{
|
||||||
|
$this->ensureConfigHasVersion($config);
|
||||||
|
$this->version = $config['version'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mixed[] $config
|
* @param mixed[] $config
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user