Skip to content
Triggered via push May 5, 2024 15:38
Status Success
Total duration 1m 59s
Billable time 12m
Artifacts
coding-standards-analysis  /  coding-standards-php
21s
coding-standards-analysis / coding-standards-php
mutation-tests
1m 49s
mutation-tests
Matrix: lint
Matrix: static-code-analysis
Matrix: unit-tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation-tests: src/Type.php#L319
Escaped Mutant for Mutator "NotIdentical": --- Original +++ New @@ @@ { $name = $type->getName(); $name === 'resource' and $name = '\resource'; - $hasNull = $type->allowsNull() && $name !== 'null' && $name !== 'mixed'; + $hasNull = $type->allowsNull() && $name !== 'null' && $name === 'mixed'; return [$name, $hasNull]; } /**
mutation-tests: src/Type.php#L319
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ { $name = $type->getName(); $name === 'resource' and $name = '\resource'; - $hasNull = $type->allowsNull() && $name !== 'null' && $name !== 'mixed'; + $hasNull = !$type->allowsNull() && !($name !== 'null') && !($name !== 'mixed'); return [$name, $hasNull]; } /**
mutation-tests: src/Type.php#L471
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if ($this->types === [['mixed']]) { return true; } - if ($this->types === [['never']] || $this->types === [['void']]) { + if ($this->types === [[]] || $this->types === [['void']]) { return false; } /** @infection-ignore-all */
mutation-tests: src/Type.php#L471
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if ($this->types === [['mixed']]) { return true; } - if ($this->types === [['never']] || $this->types === [['void']]) { + if ($this->types === [] || $this->types === [['void']]) { return false; } /** @infection-ignore-all */
mutation-tests: src/Type.php#L471
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if ($this->types === [['mixed']]) { return true; } - if ($this->types === [['never']] || $this->types === [['void']]) { + if ($this->types === [['never']] || $this->types === [[]]) { return false; } /** @infection-ignore-all */
mutation-tests: src/Type.php#L471
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if ($this->types === [['mixed']]) { return true; } - if ($this->types === [['never']] || $this->types === [['void']]) { + if ($this->types === [['never']] || $this->types === []) { return false; } /** @infection-ignore-all */
mutation-tests: src/Type.php#L471
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ if ($this->types === [['mixed']]) { return true; } - if ($this->types === [['never']] || $this->types === [['void']]) { + if ($this->types === [['never']] && $this->types === [['void']]) { return false; } /** @infection-ignore-all */
mutation-tests: src/Type.php#L502
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ public function matchedBy(Type|string $compare): bool { $compare instanceof Type or $compare = Type::byString($compare); - if ($this->types === [['mixed']] || $compare->types === [['mixed']]) { + if ($this->types === [['mixed']] || $compare->types === [[]]) { return $this->types === [['mixed']]; } if ($this->types === $compare->types) {
mutation-tests: src/Type.php#L502
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ public function matchedBy(Type|string $compare): bool { $compare instanceof Type or $compare = Type::byString($compare); - if ($this->types === [['mixed']] || $compare->types === [['mixed']]) { + if ($this->types === [['mixed']] || $compare->types === []) { return $this->types === [['mixed']]; } if ($this->types === $compare->types) {
mutation-tests: src/Type.php#L707
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $isUnion = $this->types !== []; // We are adding a union type, but if we already have types which must be standalone, or // if we are adding now some standalone types while having already some types, we bail. - if ($this->types === [['mixed']] || $this->types === [['void']] || $this->types === [['never']] || $isUnion && ($types === ['mixed'] || $types === ['void'] || $types === ['never'])) { + if ($this->types === [['mixed']] || $this->types === [[]] || $this->types === [['never']] || $isUnion && ($types === ['mixed'] || $types === ['void'] || $types === ['never'])) { throw new \Error("'mixed', 'void', and 'never' only be used as standalone types."); } if ($this->types === [['resource']] || $isUnion && $types === ['resource']) {