Skip to content

Commit df17203

Browse files
committed
refactor: Fix phpstan codeigniter.frameworkExceptionInstance
1 parent 42a00ff commit df17203

File tree

4 files changed

+2
-15
lines changed

4 files changed

+2
-15
lines changed

tests/system/Debug/ExceptionsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testDetermineCodes(): void
124124
$this->assertSame([500, EXIT_ERROR], $determineCodes(new RuntimeException('There.', 404)));
125125
$this->assertSame([500, EXIT_ERROR], $determineCodes(new RuntimeException('This.', 167)));
126126
$this->assertSame([500, EXIT_CONFIG], $determineCodes(new ConfigException('This.')));
127-
$this->assertSame([500, EXIT_CONFIG], $determineCodes(new CastException('This.')));
127+
$this->assertSame([500, EXIT_CONFIG], $determineCodes(CastException::forInvalidInterface('This.')));
128128
$this->assertSame([500, EXIT_DATABASE], $determineCodes(new DatabaseException('This.')));
129129
}
130130

tests/system/DebugTraceableTraitTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ final class DebugTraceableTraitTest extends CIUnitTestCase
2828
{
2929
public function testFactoryInstanceReturnsWhereItIsRaised(): void
3030
{
31+
/** @phpstan-ignore codeigniter.frameworkExceptionInstance */
3132
$e1 = new FrameworkException('Hello.');
3233
$e2 = FrameworkException::forEnabledZlibOutputCompression();
3334

utils/phpstan-baseline/codeigniter.frameworkExceptionInstance.neon

-13
This file was deleted.

utils/phpstan-baseline/loader.neon

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ includes:
44
- booleanAnd.rightAlwaysTrue.neon
55
- codeigniter.cacheHandlerInstance.neon
66
- codeigniter.configArgumentInstanceof.neon
7-
- codeigniter.frameworkExceptionInstance.neon
87
- codeigniter.getReassignArray.neon
98
- codeigniter.modelArgumentInstanceof.neon
109
- codeigniter.modelArgumentType.neon

0 commit comments

Comments
 (0)