Skip to content

fix readme

fix readme #22

Triggered via push January 4, 2025 10:28
Status Failure
Total duration 1m 0s
Artifacts

main.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error and 13 warnings
composer
Process completed with exit code 201.
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
composer
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
infection
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
infection: src/AnalyzeComments/Analyzer/Visitors/CommentVisitor.php#L24
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } public function enterNode(Node $node): null { - $comments = array_filter([$node->getDocComment(), ...$node->getComments()]); + $comments = array_filter([...$node->getComments()]); foreach ($comments as $comment) { $commentType = $this->commentFactory->classifyComment($comment->getText()); if ($commentType === null) {
infection: src/AnalyzeComments/Analyzer/Visitors/CommentVisitor.php#L25
Escaped Mutant for Mutator "Foreach_": @@ @@ public function enterNode(Node $node): null { $comments = array_filter([$node->getDocComment(), ...$node->getComments()]); - foreach ($comments as $comment) { + foreach ([] as $comment) { $commentType = $this->commentFactory->classifyComment($comment->getText()); if ($commentType === null) { continue;
infection: src/AnalyzeComments/Analyzer/Visitors/CommentVisitor.php#L27
Escaped Mutant for Mutator "Identical": @@ @@ $comments = array_filter([$node->getDocComment(), ...$node->getComments()]); foreach ($comments as $comment) { $commentType = $this->commentFactory->classifyComment($comment->getText()); - if ($commentType === null) { + if ($commentType !== null) { continue; } $this->comments[] = new CommentDTO($commentType->getName(), $commentType->getColor(), $this->filename, $comment->getStartLine(), $comment->getText());
infection: src/AnalyzeComments/Comments/Comment.php#L44
Escaped Mutant for Mutator "PublicVisibility": @@ @@ $this->exceedThreshold = true; return 'red'; } - final public function getPattern(): string + final protected function getPattern(): string { return static::PATTERN; }
infection: src/AnalyzeComments/Comments/Comment.php#L65
Escaped Mutant for Mutator "ProtectedVisibility": @@ @@ return static::NAME; } /** @param array<string, float> $thresholds */ - protected function isWithinThreshold(int $count, array $thresholds): bool + private function isWithinThreshold(int $count, array $thresholds): bool { $comparisonValue = $thresholds[static::NAME]; if (static::COMPARISON_TYPE === '>=') {
infection: src/AnalyzeComments/Comments/Comment.php#L70
Escaped Mutant for Mutator "GreaterThanOrEqualTo": @@ @@ { $comparisonValue = $thresholds[static::NAME]; if (static::COMPARISON_TYPE === '>=') { - return $count >= $comparisonValue; + return $count > $comparisonValue; } return $count <= $comparisonValue; } }
infection: src/AnalyzeComments/Comments/CommentTypeFactory.php#L42
Escaped Mutant for Mutator "Identical": @@ @@ public function getCommentType(string $name): ?CommentTypeInterface { foreach ($this->commentTypes as $commentType) { - if ($commentType->getName() === $name) { + if ($commentType->getName() !== $name) { return $commentType; } }
infection: src/AnalyzeComments/Comments/CommentTypeFactory.php#L57
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": @@ @@ if (!$commentType->matchesPattern($comment)) { continue; } - if ($this->allowedTypes === [] || in_array($commentType->getName(), $this->allowedTypes, true)) { + if (!($this->allowedTypes === []) || !in_array($commentType->getName(), $this->allowedTypes, true)) { return $commentType; } }
infection: src/AnalyzeComments/Comments/CommentTypeFactory.php#L57
Escaped Mutant for Mutator "LogicalOrSingleSubExprNegation": @@ @@ if (!$commentType->matchesPattern($comment)) { continue; } - if ($this->allowedTypes === [] || in_array($commentType->getName(), $this->allowedTypes, true)) { + if ($this->allowedTypes === [] || !in_array($commentType->getName(), $this->allowedTypes, true)) { return $commentType; } }
infection: src/AnalyzeComments/Config/DTO/Config.php#L32
Escaped Mutant for Mutator "TrueValue": @@ @@ /** Directories to be ignored during scanning */ public array $exclude = [], /** Filter collected comments against the baseline stored in baseline.php */ - public bool $useBaseline = true, + public bool $useBaseline = false, public string $cacheDir = 'var/cache/comments-density', /** Disable certain types; set to empty array for full statistics */ public array $disable = []