mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
Update create_own_rule.md
fix MyFirstRector example
This commit is contained in:
parent
fbf620f4b9
commit
1fecd9cb68
@ -53,7 +53,7 @@ final class MyFirstRector extends AbstractRector
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$methodCallName = $this->getName($node);
|
$methodCallName = (string)$node->name;
|
||||||
$newMethodCallName = Strings::replace($methodCallName, '#^set#', 'change');
|
$newMethodCallName = Strings::replace($methodCallName, '#^set#', 'change');
|
||||||
|
|
||||||
$node->name = new Identifier($newMethodCallName);
|
$node->name = new Identifier($newMethodCallName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user