Skip to content

fix: Fix support for comments #177

fix: Fix support for comments

fix: Fix support for comments #177

Triggered via pull request July 24, 2024 17:39
Status Failure
Total duration 2m 39s
Artifacts

tests.yaml

on: pull_request
Matrix: debug-test
Matrix: infection
Matrix: tests
Tests Status
0s
Tests Status
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 12 warnings
Infection with PHP 8.2
Process completed with exit code 2.
Tests Status
Process completed with exit code 1.
Tests with PHP 8.1 and the make `--debug` flag
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Infection with PHP 8.2
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Infection with PHP 8.2: src/Parser.php#L94
Escaped Mutant for Mutator "UnwrapRtrim": --- Original +++ New @@ @@ private static function parseLine(array $parsedRules, string $line, bool &$multiline, bool &$ignoreNextLinesOfMultiline) : array { $parsedRules = array_values($parsedRules); - $line = rtrim($line); + $line = $line; if (!self::isRule($line, $multiline)) { return $parsedRules; }
Infection with PHP 8.2: src/Parser.php#L149
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ */ private static function parsePrerequisites(string $dependencies, bool $multiline, bool &$ignoreNextLinesOfMultiline) : array { - $trimmedDependencies = trim($dependencies); + $trimmedDependencies = $dependencies; if ($ignoreNextLinesOfMultiline && $multiline || '' === $trimmedDependencies) { return []; }
Infection with PHP 8.2: src/Parser.php#L158
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ return []; } if ($multiline) { - $dependenciesParts = explode(self::MULTILINE_DELIMITER, $dependencies, 2); + $dependenciesParts = explode(self::MULTILINE_DELIMITER, $dependencies, 3); return [...self::parsePrerequisites($dependenciesParts[0], false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($dependenciesParts[1] ?? '', false, $ignoreNextLinesOfMultiline)]; } if (str_starts_with($trimmedDependencies, '#')) {
Infection with PHP 8.2: src/Parser.php#L162
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } if ($multiline) { $dependenciesParts = explode(self::MULTILINE_DELIMITER, $dependencies, 2); - return [...self::parsePrerequisites($dependenciesParts[0], false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($dependenciesParts[1] ?? '', false, $ignoreNextLinesOfMultiline)]; + return [...self::parsePrerequisites($dependenciesParts[0], false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($dependenciesParts[1] ?? '', true, $ignoreNextLinesOfMultiline)]; } if (str_starts_with($trimmedDependencies, '#')) { return [$trimmedDependencies];
Infection with PHP 8.2: src/Parser.php#L174
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } if (str_contains($trimmedDependencies, '#')) { [$nonCommentPart, $commentPart] = self::splitComment($dependencies); - return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; + return [...self::parsePrerequisites($nonCommentPart, true, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; } $semicolonPosition = mb_strpos($dependencies, ';'); if (false !== $semicolonPosition) {
Infection with PHP 8.2: src/Parser.php#L174
Escaped Mutant for Mutator "SpreadOneItem": --- Original +++ New @@ @@ } if (str_contains($trimmedDependencies, '#')) { [$nonCommentPart, $commentPart] = self::splitComment($dependencies); - return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; + return [[...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline)][0], ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; } $semicolonPosition = mb_strpos($dependencies, ';'); if (false !== $semicolonPosition) {
Infection with PHP 8.2: src/Parser.php#L175
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } if (str_contains($trimmedDependencies, '#')) { [$nonCommentPart, $commentPart] = self::splitComment($dependencies); - return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; + return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, true, $ignoreNextLinesOfMultiline)]; } $semicolonPosition = mb_strpos($dependencies, ';'); if (false !== $semicolonPosition) {
Infection with PHP 8.2: src/Parser.php#L175
Escaped Mutant for Mutator "SpreadOneItem": --- Original +++ New @@ @@ } if (str_contains($trimmedDependencies, '#')) { [$nonCommentPart, $commentPart] = self::splitComment($dependencies); - return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), ...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)]; + return [...self::parsePrerequisites($nonCommentPart, false, $ignoreNextLinesOfMultiline), [...self::parsePrerequisites($commentPart, false, $ignoreNextLinesOfMultiline)][0]]; } $semicolonPosition = mb_strpos($dependencies, ';'); if (false !== $semicolonPosition) {
Tests with PHP 8.2
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Tests with PHP 8.1
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/