-
-
Notifications
You must be signed in to change notification settings - Fork 336
/
configured_rule.php
24 lines (21 loc) · 992 Bytes
/
configured_rule.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Tests\Transform\Rector\Assign\PropertyFetchToMethodCallRector\Source\Generator;
use Rector\Tests\Transform\Rector\Assign\PropertyFetchToMethodCallRector\Source\Translator;
use Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector;
use Rector\Transform\ValueObject\PropertyFetchToMethodCall;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig
->ruleWithConfiguration(PropertyFetchToMethodCallRector::class, [
new PropertyFetchToMethodCall(Translator::class, 'locale', 'getLocale', 'setLocale'),
new PropertyFetchToMethodCall(Generator::class, 'word', 'word'),
new PropertyFetchToMethodCall(
'Rector\Tests\Transform\Rector\Assign\PropertyFetchToMethodCallRector\Fixture\Fixture2',
'parameter',
'getConfig',
null,
['parameter']
),
]);
};