refactor: Fix phpstan class.notFound (#9376)

This commit is contained in:
neznaika0 2025-01-06 16:22:55 +03:00 committed by GitHub
parent 08540f7688
commit cd27b6aa7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 2 additions and 16 deletions

View File

@ -400,7 +400,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
public function testModelNotExists(): void
{
$this->assertNull(model(UnexsistenceClass::class));
$this->assertNull(model(UnexsistenceClass::class)); // @phpstan-ignore class.notFound
}
public function testModelExistsBasename(): void

View File

@ -51,7 +51,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
$logger = new Logger(new LoggerConfig());
$this->withUri('http://example.com')
->withLogger($logger)
->controller(NeverHeardOfIt::class)
->controller(NeverHeardOfIt::class) // @phpstan-ignore class.notFound
->execute('index');
}

View File

@ -1,13 +0,0 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Class CodeIgniter\\UnexsistenceClass not found\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Class App\\Controllers\\NeverHeardOfIt not found\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php

View File

@ -2,7 +2,6 @@ includes:
- argument.type.neon
- assign.propertyType.neon
- booleanAnd.rightAlwaysTrue.neon
- class.notFound.neon
- codeigniter.cacheHandlerInstance.neon
- codeigniter.configArgumentInstanceof.neon
- codeigniter.frameworkExceptionInstance.neon