Skip to content

Fix docs (#75)

Fix docs (#75) #374

Triggered via push May 10, 2024 11:00
Status Success
Total duration 4m 32s
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/Target/AbstractTarget.php#L64
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ return; } $messages = $this->filterMessages($messages); - if (count($messages) > 0) { + if (count($messages) >= 0) { $this->export($messages); } }
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L83
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function include(array $include) : self { - $new = clone $this; + $new = $this; $new->include = $include; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L101
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function exclude(array $exclude) : self { - $new = clone $this; + $new = $this; $new->exclude = $exclude; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L139
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * * @return Message[] The filtered messages. */ - protected function filterMessages(array $messages) : array + private function filterMessages(array $messages) : array { foreach ($messages as $i => $message) { if (!$this->isCategoryMatched($message->level())) {
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L146
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ unset($messages[$i]); } } - return $messages; + return count($messages) > 1 ? array_slice($messages, 0, 1, true) : $messages; } private function isCategoryMatched(string $category) : bool {
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L156
Escaped Mutant for Mutator "Break_": --- Original +++ New @@ @@ foreach ($this->include as $pattern) { if ((new WildcardPattern($pattern))->match($category)) { $matched = true; - break; + continue; } } if ($matched) {
mutation / PHP 8.1-ubuntu-latest: src/Target/AbstractTarget.php#L164
Escaped Mutant for Mutator "Break_": --- Original +++ New @@ @@ foreach ($this->exclude as $pattern) { if ((new WildcardPattern($pattern))->match($category)) { $matched = false; - break; + continue; } } }
mutation / PHP 8.1-ubuntu-latest: src/Target/FileTarget.php#L37
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * Defaults to 0775, meaning the directory is read-writable by owner and group, * but read-only for other users. */ - public function __construct(private string $filePath, private float $requestBeginTime, private int $directoryMode = 0775) + public function __construct(private string $filePath, private float $requestBeginTime, private int $directoryMode = 508) { } public function export(array $messages) : void
mutation / PHP 8.1-ubuntu-latest: src/Target/FileTarget.php#L37
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * Defaults to 0775, meaning the directory is read-writable by owner and group, * but read-only for other users. */ - public function __construct(private string $filePath, private float $requestBeginTime, private int $directoryMode = 0775) + public function __construct(private string $filePath, private float $requestBeginTime, private int $directoryMode = 510) { } public function export(array $messages) : void
mutation / PHP 8.1-ubuntu-latest: src/Target/FileTarget.php#L45
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ public function export(array $messages) : void { $memoryPeakUsage = memory_get_peak_usage(); - $totalTime = microtime(true) - $this->requestBeginTime; + $totalTime = microtime(true) + $this->requestBeginTime; $text = "Total processing time: {$totalTime} ms; Peak memory: {$memoryPeakUsage} B. \n\n"; $text .= implode("\n", array_map([$this, 'formatMessage'], $messages)); $filename = $this->resolveFilename();