diff --git a/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Fixture/final_class_with_inherited_constant.php.inc b/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Fixture/final_class_with_inherited_constant.php.inc new file mode 100644 index 00000000000..e5aa9fda0c8 --- /dev/null +++ b/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Fixture/final_class_with_inherited_constant.php.inc @@ -0,0 +1,33 @@ + +----- + diff --git a/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Source/ParentClass.php b/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Source/ParentClass.php new file mode 100644 index 00000000000..dcbf1083ee7 --- /dev/null +++ b/rules-tests/CodeQuality/Rector/ClassConstFetch/ConvertStaticPrivateConstantToSelfRector/Source/ParentClass.php @@ -0,0 +1,9 @@ +getConstants() === []) { + if ($node->getConstants() === [] && ! $node->isFinal()) { return null; }