Skip to content

Commit 099ce7d

Browse files
committed
test: fix PHPStan errors
1 parent 24a7673 commit 099ce7d

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10386,21 +10386,11 @@
1038610386
'count' => 1,
1038710387
'path' => __DIR__ . '/tests/system/Commands/CommandGeneratorTest.php',
1038810388
];
10389-
$ignoreErrors[] = [
10390-
'message' => '#^Method CodeIgniter\\\\Commands\\\\CommandTest\\:\\:getBuffer\\(\\) has no return type specified\\.$#',
10391-
'count' => 1,
10392-
'path' => __DIR__ . '/tests/system/Commands/CommandTest.php',
10393-
];
1039410389
$ignoreErrors[] = [
1039510390
'message' => '#^Method CodeIgniter\\\\Commands\\\\CommandTest\\:\\:provideCommandParsesArgsCorrectly\\(\\) return type has no value type specified in iterable type iterable\\.$#',
1039610391
'count' => 1,
1039710392
'path' => __DIR__ . '/tests/system/Commands/CommandTest.php',
1039810393
];
10399-
$ignoreErrors[] = [
10400-
'message' => '#^Method CodeIgniter\\\\Commands\\\\CommandTest\\:\\:testCommandParsesArgsCorrectly\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#',
10401-
'count' => 1,
10402-
'path' => __DIR__ . '/tests/system/Commands/CommandTest.php',
10403-
];
1040410394
$ignoreErrors[] = [
1040510395
'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#',
1040610396
'count' => 1,

tests/system/Commands/CommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function setUp(): void
4343
$this->commands = Services::commands();
4444
}
4545

46-
protected function getBuffer()
46+
protected function getBuffer(): string
4747
{
4848
return $this->getStreamFilterBuffer();
4949
}
@@ -130,6 +130,9 @@ public function testInexistentCommandsButWithManyAlternatives(): void
130130
$this->assertStringContainsString(':clear', $this->getBuffer());
131131
}
132132

133+
/**
134+
* @param list<string> $expected
135+
*/
133136
#[DataProvider('provideCommandParsesArgsCorrectly')]
134137
public function testCommandParsesArgsCorrectly(string $input, array $expected): void
135138
{

0 commit comments

Comments
 (0)