diff --git a/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_private_clone.php.inc b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_private_clone.php.inc new file mode 100644 index 00000000000..0acf4250f95 --- /dev/null +++ b/rules-tests/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector/Fixture/skip_private_clone.php.inc @@ -0,0 +1,10 @@ +extends instanceof FullyQualified; } + if ($this->isName($classMethod, MethodName::CLONE)) { + return ! $classMethod->isPublic(); + } + return $this->isName($classMethod, MethodName::INVOKE); }