Skip to content

Commit 07205a1

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

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

tests/system/Debug/ExceptionsTest.php

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class DebugTraceableTraitTest extends CIUnitTestCase
2828
{
2929
public function testFactoryInstanceReturnsWhereItIsRaised(): void
3030
{
31-
$e1 = new FrameworkException('Hello.');
31+
$e1 = FrameworkException::forInvalidFile('./file.txt');
3232
$e2 = FrameworkException::forEnabledZlibOutputCompression();
3333

3434
$this->assertContainsEquals(DebugTraceableTrait::class, class_uses(FrameworkException::class));

utils/phpstan-baseline/codeigniter.frameworkExceptionInstance.neon

Lines changed: 0 additions & 13 deletions
This file was deleted.

utils/phpstan-baseline/loader.neon

Lines changed: 0 additions & 1 deletion
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)