mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 00:40:52 +00:00
fix cs
This commit is contained in:
parent
9bac151b41
commit
5cfd7a172f
|
@ -34,10 +34,8 @@ parameters:
|
|||
|
||||
skip:
|
||||
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
|
||||
# class might not exist
|
||||
- src/Rector/Contrib/Nette/RemoveConfiguratorConstantsRector.php
|
||||
- src/Rector/Contrib/Nette/NetteObjectToSmartTraitRector.php
|
||||
- src/Rector/Contrib/Nette/HtmlAddMethodRector.php
|
||||
# classes might not exist
|
||||
- */src/Rector/Contrib/Nette/*Rector.php
|
||||
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff:
|
||||
# examples of code to be found
|
||||
- src/Rector/Contrib/Symfony/GetterToPropertyRector.php
|
||||
|
|
|
@ -24,8 +24,8 @@ final class HtmlAddMethodRector extends AbstractChangeMethodNameRector
|
|||
{
|
||||
return [
|
||||
'Nette\Utils\Html' => [
|
||||
'add' => 'addHtml'
|
||||
]
|
||||
'add' => 'addHtml',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,14 @@ use Rector\Rector\AbstractChangeMethodNameRector;
|
|||
|
||||
final class PhpGeneratorDocumentMethodRector extends AbstractChangeMethodNameRector
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $commonMethods = [
|
||||
'addDocument' => 'addComment',
|
||||
'setDocuments' => 'setComment',
|
||||
'getDocuments' => 'getComment',
|
||||
];
|
||||
|
||||
public function getSetName(): string
|
||||
{
|
||||
|
@ -27,16 +35,7 @@ final class PhpGeneratorDocumentMethodRector extends AbstractChangeMethodNameRec
|
|||
'Nette\PhpGenerator\ClassType' => $this->commonMethods,
|
||||
'Nette\PhpGenerator\Method' => $this->commonMethods,
|
||||
'Nette\PhpGenerator\PhpFile' => $this->commonMethods,
|
||||
'Nette\PhpGenerator\Property' => $this->commonMethods
|
||||
'Nette\PhpGenerator\Property' => $this->commonMethods,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $commonMethods = [
|
||||
'addDocument' => 'addComment',
|
||||
'setDocuments' => 'setComment',
|
||||
'getDocuments' => 'getComment'
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user