Update create_own_rule.md

fix MyFirstRector example
This commit is contained in:
Alexander Frolov 2020-06-23 18:58:04 -04:00 committed by GitHub
parent fbf620f4b9
commit 1fecd9cb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ final class MyFirstRector extends AbstractRector
return null;
}
$methodCallName = $this->getName($node);
$methodCallName = (string)$node->name;
$newMethodCallName = Strings::replace($methodCallName, '#^set#', 'change');
$node->name = new Identifier($newMethodCallName);