We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5cc290 commit 0fcf821Copy full SHA for 0fcf821
tests/Rules/PHPUnit/data/assert-same.php
@@ -65,4 +65,17 @@ public function testOther()
65
$foo->assertSame();
66
}
67
68
+ public function testStaticMethodReturnWithSameTypeIsNotReported()
69
+ {
70
+ $this->assertSame(self::createSomething('foo'), self::createSomething('foo'));
71
+ }
72
+
73
+ /**
74
+ * @return object
75
+ */
76
+ private static function createSomething(string $what)
77
78
+ return new \stdClass();
79
80
81
0 commit comments