diff --git a/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/removed_empty_construct_when_no_parent_construct.php.inc b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/removed_empty_construct_when_no_parent_construct.php.inc new file mode 100644 index 00000000000..f7f875fca50 --- /dev/null +++ b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/removed_empty_construct_when_no_parent_construct.php.inc @@ -0,0 +1,26 @@ + +----- + diff --git a/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_construct_from_trait.php.inc b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_construct_from_trait.php.inc new file mode 100644 index 00000000000..e1ce7d8e0df --- /dev/null +++ b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_construct_from_trait.php.inc @@ -0,0 +1,14 @@ +isName($classMethod, MethodName::CONSTRUCT)) { - // has parent class? - return $class->extends instanceof FullyQualified; - } - if ($this->isName($classMethod, MethodName::CLONE)) { return ! $classMethod->isPublic(); }