diff --git a/docs/AllRectorsOverview.md b/docs/AllRectorsOverview.md index 9f4a630d8ba..81ac1b22f67 100644 --- a/docs/AllRectorsOverview.md +++ b/docs/AllRectorsOverview.md @@ -4242,13 +4242,13 @@ Changes pow(val, val2) to ** (exp) parameter ### `PreferThisOrSelfMethodCallRector` -- class: `Rector\Php\Rector\MethodCall\PreferThisOrSelfMethodCallRector` +- class: `Rector\CodingStyle\Rector\MethodCall\PreferThisOrSelfMethodCallRector` Changes $this->... to self:: or vise versa for specific types ```yaml services: - Rector\Php\Rector\MethodCall\PreferThisOrSelfMethodCallRector: + Rector\CodingStyle\Rector\MethodCall\PreferThisOrSelfMethodCallRector: PHPUnit\TestCase: self ``` diff --git a/packages/Php/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php b/packages/CodingStyle/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php similarity index 95% rename from packages/Php/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php rename to packages/CodingStyle/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php index 935632dae86..74bcdbbe1c1 100644 --- a/packages/Php/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php +++ b/packages/CodingStyle/src/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php @@ -1,6 +1,6 @@ assertThis(); + self::assertThis(); + parent::assertThis(); + } +} + +?> +----- + diff --git a/packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc b/packages/CodingStyle/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc similarity index 53% rename from packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc rename to packages/CodingStyle/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc index 280b911b218..735f551f913 100644 --- a/packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc +++ b/packages/CodingStyle/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Fixture/to_this.php.inc @@ -1,8 +1,8 @@ assertThis(); - self::assertThis(); - parent::assertThis(); - } -} - -?> ------ - diff --git a/packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Source/AbstractTestCase.php b/packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Source/AbstractTestCase.php deleted file mode 100644 index 26d3cbd5f33..00000000000 --- a/packages/Php/tests/Rector/MethodCall/PreferThisOrSelfMethodCallRector/Source/AbstractTestCase.php +++ /dev/null @@ -1,8 +0,0 @@ -