diff --git a/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/include_abstract.php.inc b/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/include_abstract.php.inc deleted file mode 100644 index 2f6a9a0f8bf..00000000000 --- a/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/include_abstract.php.inc +++ /dev/null @@ -1,21 +0,0 @@ - ------ - diff --git a/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/skip_abstract_class.php.inc b/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/skip_abstract_class.php.inc new file mode 100644 index 00000000000..83a2737c5ef --- /dev/null +++ b/rules-tests/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector/Fixture/skip_abstract_class.php.inc @@ -0,0 +1,8 @@ +doTestFileInfo($fileInfo); - } - - /** - * @return Iterator - */ - public function provideData(): Iterator - { - return $this->yieldFilesFromDirectory(__DIR__ . '/FixtureOpenSource'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/fixture_open_source.php'; - } -} diff --git a/rules/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector.php b/rules/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector.php index e5be21a6881..5f625a69982 100644 --- a/rules/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector.php +++ b/rules/Privatization/Rector/Property/PrivatizeLocalPropertyToPrivatePropertyRector.php @@ -158,8 +158,8 @@ private function shouldSkipClass(ClassLike $classLike): bool return true; } - if (! $classLike->isAbstract()) { - return false; + if ($classLike->isAbstract()) { + return true; } return $this->isOpenSourceProjectType();