More phpstan checks for better code

This commit is contained in:
Jaapio
2026-01-01 22:36:45 +01:00
parent f08359470f
commit 3f6d648d7d
26 changed files with 154 additions and 92 deletions
+6 -2
View File
@@ -41,8 +41,12 @@ final class PregSplitTest extends TestCase
public function testPregSplitThrowsOnError(): void
{
//We need to disable the error handler for phpunit... because we expect some errors here
$this->errorHandler = set_error_handler(static function (): void {
}, E_WARNING);
$this->errorHandler = set_error_handler(
static function (int $i, string $s, string $s2, int $x, ?array $trace = null): bool {
return true;
},
E_WARNING
);
$this->expectException(PcreException::class);
Utils::pregSplit('~InvalidRegular)Expression~', 'some word');