Skip to content

Fix psalm (#97)

Fix psalm (#97) #515

Triggered via push January 29, 2024 12:51
Status Success
Total duration 1m 21s
Artifacts

mutation.yml

on: push
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L65
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $renderer ??= $this->defaultRenderer; try { - $this->logger->error((string) (new PlainTextRenderer())->renderVerbose($t, $request), ['throwable' => $t]); + $this->logger->error((string) (new PlainTextRenderer())->renderVerbose($t, $request), []); return $this->debug ? $renderer->renderVerbose($t, $request) : $renderer->render($t, $request); } catch (Throwable $t) { return new ErrorData((string) $t);
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L65
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { $renderer ??= $this->defaultRenderer; try { - $this->logger->error((string) (new PlainTextRenderer())->renderVerbose($t, $request), ['throwable' => $t]); + return $this->debug ? $renderer->renderVerbose($t, $request) : $renderer->render($t, $request); } catch (Throwable $t) { return new ErrorData((string) $t);
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L105
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ if ($this->enabled) { return; } - if ($this->memoryReserveSize > 0) { + if ($this->memoryReserveSize >= 0) { $this->memoryReserve = str_repeat('x', $this->memoryReserveSize); } $this->initializeOnce();
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L105
Escaped Mutant for Mutator "GreaterThanNegotiation": --- Original +++ New @@ @@ if ($this->enabled) { return; } - if ($this->memoryReserveSize > 0) { + if ($this->memoryReserveSize <= 0) { $this->memoryReserve = str_repeat('x', $this->memoryReserveSize); } $this->initializeOnce();
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L109
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if ($this->memoryReserveSize > 0) { $this->memoryReserve = str_repeat('x', $this->memoryReserveSize); } - $this->initializeOnce(); + // Handles throwable, echo output and exit. set_exception_handler(function (Throwable $t) : void { if (!$this->enabled) {
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L112
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ $this->memoryReserve = str_repeat('x', $this->memoryReserveSize); } $this->initializeOnce(); - // Handles throwable, echo output and exit. - set_exception_handler(function (Throwable $t) : void { - if (!$this->enabled) { - return; - } - $this->renderThrowableAndTerminate($t); - }); + // Handles PHP execution errors such as warnings and notices. set_error_handler(function (int $severity, string $message, string $file, int $line) : bool { if (!$this->enabled) {
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L123
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ // Handles PHP execution errors such as warnings and notices. set_error_handler(function (int $severity, string $message, string $file, int $line) : bool { if (!$this->enabled) { - return false; + return true; } if (!(error_reporting() & $severity)) { // This error code is not included in error_reporting.
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L126
Escaped Mutant for Mutator "BitwiseAnd": --- Original +++ New @@ @@ if (!$this->enabled) { return false; } - if (!(error_reporting() & $severity)) { + if (!(error_reporting() | $severity)) { // This error code is not included in error_reporting. return true; }
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L142
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ */ public function unregister() : void { - if (!$this->enabled) { + if ($this->enabled) { return; } $this->memoryReserve = '';
mutation / PHP 8.1-ubuntu-latest: src/ErrorHandler.php#L148
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ return; } $this->memoryReserve = ''; - $this->enabled = false; + $this->enabled = true; } private function initializeOnce() : void {