[ 'foo(); }', ], 'assertInstanceOfInterface' => [ 'bar(); $a->foo(); }', ], 'assertInstanceOfMultipleInterfaces' => [ 'bar(); $a->foo1(); }', ], 'assertInstanceOfBInClassMethod' => [ 'assertInstanceOfB($a); $a->foo(); } }', ], 'assertPropertyNotNull' => [ 'a) { throw new \Exception(); } } public function takesA(A $a): void { $this->assertNotNullProperty(); $a->foo(); } }', ], 'assertWithoutRedundantCondition' => [ ' [ 'foo(); }', ], 'assertIfTrueAnnotation' => [ ' [ ' [ ' [ 'sayHello();' ], 'dontBleedBadAssertVarIntoContext' => [ 'foo()); assertFalse($a->bar()); }' ], 'suppressRedundantCondition' => [ ' [ ' [ ' [ ' [ 'bar(); $a->foo1(); }', 'error_message' => 'UndefinedMethod', ], 'assertIfTrueNoAnnotation' => [ ' 'PossiblyNullOperand', ], 'assertIfFalseNoAnnotation' => [ ' 'PossiblyNullOperand', ], 'assertIfTrueMethodCall' => [ 'isInt($p)) { strlen($p); } } }', 'error_message' => 'InvalidScalarArgument', ], 'assertIfStaticTrueMethodCall' => [ 'isInt($p)) { strlen($p); } } }', 'error_message' => 'InvalidScalarArgument', ], 'noFatalForUnknownAssertClass' => [ 'sayHello();', 'error_message' => 'UndefinedClass', ], 'detectRedundantCondition' => [ ' 'RedundantCondition' ], 'detectAssertSameTypeDoesNotContainType' => [ ' 'TypeDoesNotContainType' ], 'detectAssertAlwaysSame' => [ ' 'RedundantCondition' ], 'detectNeverCanBeSameAfterAssertion' => [ ' 'TypeDoesNotContainType' ], 'detectNeverCanBeNotSameAfterAssertion' => [ ' 'RedundantCondition' ], 'detectNeverCanBeEqualAfterAssertion' => [ ' 'TypeDoesNotContainType' ], 'detectIntFloatNeverCanBeEqualAfterAssertion' => [ ' 'TypeDoesNotContainType' ], 'detectFloatIntNeverCanBeEqualAfterAssertion' => [ ' 'TypeDoesNotContainType' ], ]; } }