diff --git a/rules-tests/Php70/Rector/ClassMethod/Php4ConstructorRector/Fixture/skip_class_unknown_to_reflection.php.inc b/rules-tests/Php70/Rector/ClassMethod/Php4ConstructorRector/Fixture/skip_class_unknown_to_reflection.php.inc new file mode 100644 index 00000000000..8868a74c668 --- /dev/null +++ b/rules-tests/Php70/Rector/ClassMethod/Php4ConstructorRector/Fixture/skip_class_unknown_to_reflection.php.inc @@ -0,0 +1,14 @@ +reflectionProvider->hasClass($className)) { - throw new ShouldNotHappenException(sprintf('Class "%s" should be known at this point', $className)); + return null; } return $this->reflectionProvider->getClass($className);