@@ -74,7 +74,7 @@ final class SomeTest extends TestCase
7474 public function test()
7575 {
7676 $someObject = $this->getSomeObject();
77- $this->assertInstanceof (SomeClass::class, $someObject);
77+ $this->assertInstanceOf (SomeClass::class, $someObject);
7878
7979 $value = $someObject->getSomeMethod();
8080 }
@@ -130,8 +130,8 @@ public function refactor(Node $node): ?Node
130130 }
131131
132132 // adding type here + popping the variable name out
133- $ assertInstanceofExpression = $ this ->createAssertInstanceof ($ matchedNullableVariableNameToType );
134- array_splice ($ node ->stmts , $ key + $ next , 0 , [$ assertInstanceofExpression ]);
133+ $ assertInstanceOfExpression = $ this ->createAssertInstanceOf ($ matchedNullableVariableNameToType );
134+ array_splice ($ node ->stmts , $ key + $ next , 0 , [$ assertInstanceOfExpression ]);
135135
136136 // remove variable name from nullable ones
137137 $ hasChanged = true ;
@@ -162,14 +162,14 @@ private function isNullableType(Type $type): bool
162162 return count ($ type ->getTypes ()) === 2 ;
163163 }
164164
165- private function createAssertInstanceof (VariableNameToType $ variableNameToType ): Expression
165+ private function createAssertInstanceOf (VariableNameToType $ variableNameToType ): Expression
166166 {
167167 $ args = [
168168 new Arg (new ClassConstFetch (new FullyQualified ($ variableNameToType ->getObjectType ()), 'class ' )),
169169 new Arg (new Variable ($ variableNameToType ->getVariableName ())),
170170 ];
171171
172- $ methodCall = new MethodCall (new Variable ('this ' ), 'assertInstanceof ' , $ args );
172+ $ methodCall = new MethodCall (new Variable ('this ' ), 'assertInstanceOf ' , $ args );
173173
174174 return new Expression ($ methodCall );
175175 }
0 commit comments