mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-28 05:33:30 +00:00
Make example of ReplaceStringWithClassConstantRector more correct (#5269)
* Make example of ReplaceStringWithClassConstantRector more correct - `argument position` and `class with constants` are swapped - `argument position` starts with zero (0), so `1` is the second argument * also fix example in `Rector`ing class
This commit is contained in:
parent
8cd6dbea3b
commit
10b96a0b97
|
@ -14133,7 +14133,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
$services->set(ReplaceStringWithClassConstantRector::class)
|
||||
->call('configure', [[
|
||||
ReplaceStringWithClassConstantRector::REPLACE_STRING_WITH_CLASS_CONSTANT => ValueObjectInliner::inline([
|
||||
new ReplaceStringWithClassConstant('SomeClass', 'call', 'Placeholder', 1),
|
||||
new ReplaceStringWithClassConstant('SomeClass', 'call', 0, 'Placeholder'),
|
||||
]),
|
||||
]]);
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ CODE_SAMPLE
|
|||
,
|
||||
[
|
||||
self::REPLACE_STRING_WITH_CLASS_CONSTANT => [
|
||||
new ReplaceStringWithClassConstant('SomeClass', 'call', 1, 'Placeholder'),
|
||||
new ReplaceStringWithClassConstant('SomeClass', 'call', 0, 'Placeholder'),
|
||||
],
|
||||
]
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user