@@ -617,7 +617,9 @@ public function testBug6896(): void
617
617
public function testBug6940 (): void
618
618
{
619
619
$ errors = $ this ->runAnalyse (__DIR__ . '/data/bug-6940.php ' );
620
- $ this ->assertNoErrors ($ errors );
620
+ $ this ->assertCount (1 , $ errors );
621
+ $ this ->assertSame ('Loose comparison using == between array{} and array{} will always evaluate to true. ' , $ errors [0 ]->getMessage ());
622
+ $ this ->assertSame (12 , $ errors [0 ]->getLine ());
621
623
}
622
624
623
625
public function testBug1447 (): void
@@ -881,13 +883,16 @@ public function testBug7554(): void
881
883
public function testBug7637 (): void
882
884
{
883
885
$ errors = $ this ->runAnalyse (__DIR__ . '/data/bug-7637.php ' );
884
- $ this ->assertCount (2 , $ errors );
886
+ $ this ->assertCount (3 , $ errors );
885
887
886
888
$ this ->assertSame ('Method Bug7637\HelloWorld::getProperty() has invalid return type Bug7637\rex_backend_login. ' , $ errors [0 ]->getMessage ());
887
889
$ this ->assertSame (54 , $ errors [0 ]->getLine ());
888
890
889
891
$ this ->assertSame ('Method Bug7637\HelloWorld::getProperty() has invalid return type Bug7637\rex_timer. ' , $ errors [1 ]->getMessage ());
890
892
$ this ->assertSame (54 , $ errors [1 ]->getLine ());
893
+
894
+ $ this ->assertSame ('Call to function is_string() with string will always evaluate to true. ' , $ errors [2 ]->getMessage ());
895
+ $ this ->assertSame (57 , $ errors [2 ]->getLine ());
891
896
}
892
897
893
898
public function testBug7737 (): void
@@ -1022,11 +1027,15 @@ public function testBug8376(): void
1022
1027
public function testAssertDocblock (): void
1023
1028
{
1024
1029
$ errors = $ this ->runAnalyse (__DIR__ . '/data/assert-docblock.php ' );
1025
- $ this ->assertCount (2 , $ errors );
1030
+ $ this ->assertCount (4 , $ errors );
1026
1031
$ this ->assertSame ('Call to method AssertDocblock\A::testInt() with string will always evaluate to false. ' , $ errors [0 ]->getMessage ());
1027
1032
$ this ->assertSame (218 , $ errors [0 ]->getLine ());
1028
- $ this ->assertSame ('Call to method AssertDocblock\A::testNotInt() with int will always evaluate to false. ' , $ errors [1 ]->getMessage ());
1029
- $ this ->assertSame (238 , $ errors [1 ]->getLine ());
1033
+ $ this ->assertSame ('Call to method AssertDocblock\A::testNotInt() with string will always evaluate to true. ' , $ errors [1 ]->getMessage ());
1034
+ $ this ->assertSame (224 , $ errors [1 ]->getLine ());
1035
+ $ this ->assertSame ('Call to method AssertDocblock\A::testInt() with int will always evaluate to true. ' , $ errors [2 ]->getMessage ());
1036
+ $ this ->assertSame (232 , $ errors [2 ]->getLine ());
1037
+ $ this ->assertSame ('Call to method AssertDocblock\A::testNotInt() with int will always evaluate to false. ' , $ errors [3 ]->getMessage ());
1038
+ $ this ->assertSame (238 , $ errors [3 ]->getLine ());
1030
1039
}
1031
1040
1032
1041
public function testBug8147 (): void
@@ -1101,7 +1110,12 @@ public static function getAdditionalConfigFiles(): array
1101
1110
public function testBug8004 (): void
1102
1111
{
1103
1112
$ errors = $ this ->runAnalyse (__DIR__ . '/data/bug-8004.php ' );
1104
- $ this ->assertNoErrors ($ errors );
1113
+ $ this ->assertCount (2 , $ errors );
1114
+ $ this ->assertSame ('Strict comparison using !== between null and DateTimeInterface|string will always evaluate to true. ' , $ errors [0 ]->getMessage ());
1115
+ $ this ->assertSame (49 , $ errors [0 ]->getLine ());
1116
+
1117
+ $ this ->assertSame ('Strict comparison using !== between null and DateTimeInterface|string will always evaluate to true. ' , $ errors [1 ]->getMessage ());
1118
+ $ this ->assertSame (59 , $ errors [1 ]->getLine ());
1105
1119
}
1106
1120
1107
1121
public function testSkipCheckNoGenericClasses (): void
0 commit comments