Skip to content

Fix docs

Fix docs #648

Triggered via pull request May 22, 2024 17:31
Status Success
Total duration 1m 53s
Artifacts

mutation.yml

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

Annotations

10 warnings
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L51
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * * @return string String containing PHP code. */ - public function export(Closure $closure, int $level = 0) : string + public function export(Closure $closure, int $level = -1) : string { $reflection = new ReflectionFunction($closure); $fileName = $reflection->getFileName();
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L51
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * * @return string String containing PHP code. */ - public function export(Closure $closure, int $level = 0) : string + public function export(Closure $closure, int $level = 1) : string { $reflection = new ReflectionFunction($closure); $fileName = $reflection->getFileName();
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L59
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ $fileName = $reflection->getFileName(); $start = $reflection->getStartLine(); $end = $reflection->getEndLine(); - if ($fileName === false || $start === false || $end === false || ($fileContent = file($fileName)) === false) { + if ($fileName === false && $start === false || $end === false || ($fileContent = file($fileName)) === false) { return 'function () {/* Error: unable to determine Closure source */}'; } --$start;
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L59
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ $fileName = $reflection->getFileName(); $start = $reflection->getStartLine(); $end = $reflection->getEndLine(); - if ($fileName === false || $start === false || $end === false || ($fileContent = file($fileName)) === false) { + if (($fileName === false || $start === false) && $end === false || ($fileContent = file($fileName)) === false) { return 'function () {/* Error: unable to determine Closure source */}'; } --$start;
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L65
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ } --$start; $uses = $this->useStatementParser->fromFile($fileName); - $tokens = token_get_all('<?php ' . implode('', array_slice($fileContent, $start, $end - $start))); + $tokens = token_get_all('<?php ' . implode('', array_slice($fileContent, $start, $end + $start))); array_shift($tokens); $bufferUse = ''; $closureTokens = [];
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L66
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ --$start; $uses = $this->useStatementParser->fromFile($fileName); $tokens = token_get_all('<?php ' . implode('', array_slice($fileContent, $start, $end - $start))); - array_shift($tokens); + $bufferUse = ''; $closureTokens = []; $pendingParenthesisCount = 0;
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L90
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $readableToken = $this->processFullUse($readableToken, $uses); $bufferUse = ''; } elseif (isset($uses[$readableToken])) { - if (isset($tokens[$i + 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { + if (isset($tokens[$i + 0]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { $bufferUse .= $uses[$readableToken]; continue; }
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L90
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $readableToken = $this->processFullUse($readableToken, $uses); $bufferUse = ''; } elseif (isset($uses[$readableToken])) { - if (isset($tokens[$i + 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { + if (isset($tokens[$i + 2]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { $bufferUse .= $uses[$readableToken]; continue; }
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L90
Escaped Mutant for Mutator "Plus": --- Original +++ New @@ @@ $readableToken = $this->processFullUse($readableToken, $uses); $bufferUse = ''; } elseif (isset($uses[$readableToken])) { - if (isset($tokens[$i + 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { + if (isset($tokens[$i - 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { $bufferUse .= $uses[$readableToken]; continue; }
mutation / PHP 8.2-ubuntu-latest: src/ClosureExporter.php#L90
Escaped Mutant for Mutator "Plus": --- Original +++ New @@ @@ $readableToken = $this->processFullUse($readableToken, $uses); $bufferUse = ''; } elseif (isset($uses[$readableToken])) { - if (isset($tokens[$i + 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i + 1])) { + if (isset($tokens[$i + 1]) && $this->useStatementParser->isTokenIsPartOfUse($tokens[$i - 1])) { $bufferUse .= $uses[$readableToken]; continue; }