Skip to content

Commit 896bc2b

Browse files
committed
fix phpstan
1 parent 9cc2a5e commit 896bc2b

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

tests/system/CodeIgniterTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testRunEmptyDefaultRouteReturnResponse(): void
9696
$_SERVER['argc'] = 1;
9797

9898
$response = $this->codeigniter->run(null, true);
99-
$this->assertInstanceof(ResponseInterface::class, $response);
99+
$this->assertInstanceOf(ResponseInterface::class, $response);
100100

101101
$this->assertStringContainsString('Welcome to CodeIgniter', $response->getBody());
102102
}
@@ -161,7 +161,7 @@ public function testRun404OverrideControllerReturnsResponse(): void
161161
Services::injectMock('router', $router);
162162

163163
$response = $this->codeigniter->run($routes, true);
164-
$this->assertInstanceof(ResponseInterface::class, $response);
164+
$this->assertInstanceOf(ResponseInterface::class, $response);
165165

166166
$this->assertStringContainsString('Oops', $response->getBody());
167167
$this->assertSame(567, $response->getStatusCode());
@@ -180,7 +180,7 @@ public function testRun404OverrideReturnResponse(): void
180180
Services::injectMock('router', $router);
181181

182182
$response = $this->codeigniter->run($routes, true);
183-
$this->assertInstanceof(ResponseInterface::class, $response);
183+
$this->assertInstanceOf(ResponseInterface::class, $response);
184184

185185
$this->assertStringContainsString('Oops', $response->getBody());
186186
}
@@ -471,7 +471,7 @@ public function testRunForceSecure(): void
471471
$this->assertNull($response->header('Location'));
472472

473473
$response = $codeigniter->run(null, true);
474-
$this->assertInstanceof(ResponseInterface::class, $response);
474+
$this->assertInstanceOf(ResponseInterface::class, $response);
475475

476476
$this->assertSame('https://example.com/index.php/', $response->header('Location')->getValue());
477477
}

tests/system/Database/Live/OCI8/LastInsertIDTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testGetInsertIDWithPreparedQuery(): void
8484

8585
return (new Query($db))->setQuery($sql);
8686
});
87-
$this->assertInstanceof(BasePreparedQuery::class, $query);
87+
$this->assertInstanceOf(BasePreparedQuery::class, $query);
8888

8989
$query->execute('foo', 'bar');
9090
$actual = $this->db->insertID();

tests/system/HTTP/Files/FileCollectionTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public function testErrorString(): void
359359

360360
$collection = new FileCollection();
361361
$file = $collection->getFile('userfile');
362-
$this->assertInstanceof(UploadedFile::class, $file);
362+
$this->assertInstanceOf(UploadedFile::class, $file);
363363

364364
$this->assertSame($expected, $file->getErrorString());
365365
}
@@ -380,7 +380,7 @@ public function testErrorStringWithUnknownError(): void
380380

381381
$collection = new FileCollection();
382382
$file = $collection->getFile('userfile');
383-
$this->assertInstanceof(UploadedFile::class, $file);
383+
$this->assertInstanceOf(UploadedFile::class, $file);
384384

385385
$this->assertSame($expected, $file->getErrorString());
386386
}
@@ -400,7 +400,7 @@ public function testErrorStringWithNoError(): void
400400

401401
$collection = new FileCollection();
402402
$file = $collection->getFile('userfile');
403-
$this->assertInstanceof(UploadedFile::class, $file);
403+
$this->assertInstanceOf(UploadedFile::class, $file);
404404

405405
$this->assertSame($expected, $file->getErrorString());
406406
}
@@ -419,7 +419,7 @@ public function testError(): void
419419

420420
$collection = new FileCollection();
421421
$file = $collection->getFile('userfile');
422-
$this->assertInstanceof(UploadedFile::class, $file);
422+
$this->assertInstanceOf(UploadedFile::class, $file);
423423

424424
$this->assertSame(UPLOAD_ERR_INI_SIZE, $file->getError());
425425
}
@@ -437,7 +437,7 @@ public function testErrorWithUnknownError(): void
437437

438438
$collection = new FileCollection();
439439
$file = $collection->getFile('userfile');
440-
$this->assertInstanceof(UploadedFile::class, $file);
440+
$this->assertInstanceOf(UploadedFile::class, $file);
441441

442442
$this->assertSame(0, $file->getError());
443443
}
@@ -456,7 +456,7 @@ public function testErrorWithNoError(): void
456456

457457
$collection = new FileCollection();
458458
$file = $collection->getFile('userfile');
459-
$this->assertInstanceof(UploadedFile::class, $file);
459+
$this->assertInstanceOf(UploadedFile::class, $file);
460460

461461
$this->assertSame(UPLOAD_ERR_OK, $file->getError());
462462
}
@@ -475,7 +475,7 @@ public function testClientPathReturnsValidFullPath(): void
475475

476476
$collection = new FileCollection();
477477
$file = $collection->getFile('userfile');
478-
$this->assertInstanceof(UploadedFile::class, $file);
478+
$this->assertInstanceOf(UploadedFile::class, $file);
479479

480480
$this->assertSame('someDir/someFile.txt', $file->getClientPath());
481481
}
@@ -493,7 +493,7 @@ public function testClientPathReturnsNullWhenFullPathIsNull(): void
493493

494494
$collection = new FileCollection();
495495
$file = $collection->getFile('userfile');
496-
$this->assertInstanceof(UploadedFile::class, $file);
496+
$this->assertInstanceOf(UploadedFile::class, $file);
497497

498498
$this->assertNull($file->getClientPath());
499499
}

tests/system/HTTP/Files/FileMovingTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function testInvalidFile(): void
264264
$this->expectException(HTTPException::class);
265265

266266
$file = $collection->getFile('userfile');
267-
$this->assertInstanceof(UploadedFile::class, $file);
267+
$this->assertInstanceOf(UploadedFile::class, $file);
268268
$file->move($destination, $file->getName(), false);
269269
}
270270

@@ -291,7 +291,7 @@ public function testFailedMoveBecauseOfWarning(): void
291291
$this->expectException(HTTPException::class);
292292

293293
$file = $collection->getFile('userfile');
294-
$this->assertInstanceof(UploadedFile::class, $file);
294+
$this->assertInstanceOf(UploadedFile::class, $file);
295295
$file->move($destination, $file->getName(), false);
296296
}
297297

@@ -323,7 +323,7 @@ public function testFailedMoveBecauseOfFalseReturned(): void
323323
$this->expectExceptionMessage('move_uploaded_file() returned false');
324324

325325
$file = $collection->getFile('userfile1');
326-
$this->assertInstanceof(UploadedFile::class, $file);
326+
$this->assertInstanceOf(UploadedFile::class, $file);
327327
$file->move($destination, $file->getName(), false);
328328
}
329329
}

tests/system/Pager/PagerRendererTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ public function testPageStartEnd(array $details, int $pageStart, int $pageEnd):
635635
}
636636

637637
/**
638-
* @return array<string, array<string, mixed>> $details
638+
* @return array<string, list<array<string, int|URI>|int>> $details
639639
*/
640640
public static function providePageStartEnd(): iterable
641641
{

tests/system/Test/ControllerTestTraitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testRequestPassthrough(): void
162162
->execute('popper');
163163

164164
$req = $result->request();
165-
$this->assertInstanceof(RequestInterface::class, $req);
165+
$this->assertInstanceOf(RequestInterface::class, $req);
166166
$this->assertSame('GET', $req->getMethod());
167167
}
168168

0 commit comments

Comments
 (0)