diff --git a/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Fixture/skip_stringable_object.php.inc b/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Fixture/skip_stringable_object.php.inc new file mode 100644 index 00000000..e1ef88cb --- /dev/null +++ b/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Fixture/skip_stringable_object.php.inc @@ -0,0 +1,14 @@ +assertEquals('value', new SimpleStringable()); + } +} diff --git a/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Source/SimpleStringable.php b/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Source/SimpleStringable.php new file mode 100644 index 00000000..a7b37610 --- /dev/null +++ b/rules-tests/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector/Source/SimpleStringable.php @@ -0,0 +1,13 @@ +isObjectType( + $args[1]->value, + new ObjectType('Stringable') + )) { + return null; + } } $hasChanged = $this->identifierManipulator->renameNodeWithMap($node, self::RENAME_METHODS_MAP);