Skip to content

Improved compatibility fixtures #130

Improved compatibility fixtures

Improved compatibility fixtures #130

Triggered via push February 28, 2024 13:03
Status Failure
Total duration 2m 37s
Artifacts
Matrix: composer-normalize
Matrix: composer-validate
Matrix: infection
Matrix: php-cs-fixer
Matrix: psalm
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 10 warnings
InvalidReturnType: src/PhpParserReflector/ClassReflections.php#L21
src/PhpParserReflector/ClassReflections.php:21:16: InvalidReturnType: The declared return type '0|16|32|48|64|80|96|112' for Typhoon\Reflection\PhpParserReflector\ClassReflections::modifiers is incorrect, got '0|32|64|96|65536|65568|65600|65632' (see https://psalm.dev/011)
InvalidReturnStatement: src/PhpParserReflector/ClassReflections.php#L33
src/PhpParserReflector/ClassReflections.php:33:16: InvalidReturnStatement: The inferred type '0|32|64|96|65536|65568|65600|65632' does not match the declared return type '0|16|32|48|64|80|96|112' for Typhoon\Reflection\PhpParserReflector\ClassReflections::modifiers (see https://psalm.dev/128)
psalm (8.1)
Process completed with exit code 2.
infection (8.1): src/ClassReflection.php#L447
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": --- Original +++ New @@ @@ } public function isInstance(object $object) : bool { - return $this->metadata->name === $object::class || $this->reflectClass($object::class)->isSubclassOf($this); + return !($this->metadata->name === $object::class) || !$this->reflectClass($object::class)->isSubclassOf($this); } public function isInstantiable() : bool {
infection (8.1): src/MethodReflection.php#L436
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ { if (!$this->nativeLoaded) { parent::__construct($this->currentClass, $this->metadata->name); - $this->nativeLoaded = true; + $this->nativeLoaded = false; } } }
infection (8.1): src/NameContext/NameContext.php#L83
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function enterNamespace(?string $namespace = null) : void { - $this->leaveNamespace(); + if ($namespace !== null) { $this->namespace = self::parse($namespace)->resolve(); }
infection (8.1): src/NameContext/NameContext.php#L109
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ public function addConstantUse(string $name, ?string $alias = null) : void { $resolvedName = self::parse($name)->resolve(); - $resolvedAlias = ($alias === null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); + $resolvedAlias = ($alias !== null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); if (isset($this->constantImportTable[$resolvedAlias])) { throw new DefaultReflectionException(sprintf('Cannot use constant %s as %s because the name is already in use.', $name, $resolvedAlias)); }
infection (8.1): src/NameContext/NameContext.php#L109
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ public function addConstantUse(string $name, ?string $alias = null) : void { $resolvedName = self::parse($name)->resolve(); - $resolvedAlias = ($alias === null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); + $resolvedAlias = ($alias === null ? new UnqualifiedName($alias) : $resolvedName->lastSegment())->toString(); if (isset($this->constantImportTable[$resolvedAlias])) { throw new DefaultReflectionException(sprintf('Cannot use constant %s as %s because the name is already in use.', $name, $resolvedAlias)); }
infection (8.1): src/NameContext/NameContext.php#L125
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ public function addFunctionUse(string $name, ?string $alias = null) : void { $resolvedName = self::parse($name)->resolve(); - $resolvedAlias = ($alias === null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); + $resolvedAlias = ($alias !== null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); if (isset($this->functionImportTable[$resolvedAlias])) { throw new DefaultReflectionException(sprintf('Cannot use constant %s as %s because the name is already in use.', $name, $resolvedAlias)); }
infection (8.1): src/NameContext/NameContext.php#L125
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ public function addFunctionUse(string $name, ?string $alias = null) : void { $resolvedName = self::parse($name)->resolve(); - $resolvedAlias = ($alias === null ? $resolvedName->lastSegment() : new UnqualifiedName($alias))->toString(); + $resolvedAlias = ($alias === null ? new UnqualifiedName($alias) : $resolvedName->lastSegment())->toString(); if (isset($this->functionImportTable[$resolvedAlias])) { throw new DefaultReflectionException(sprintf('Cannot use constant %s as %s because the name is already in use.', $name, $resolvedAlias)); }
infection (8.1): src/NameContext/NameContext.php#L140
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function enterClass(string $unresolvedName, ?string $unresolvedParentName, bool $trait, bool $final) : void { - $this->leaveClass(); + $this->inClass = true; if ($trait) { return;
infection (8.1): src/NameContext/NameContext.php#L154
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ if ($unresolvedParentName !== null) { $this->namespaceImportTable[self::PARENT] = self::parse($unresolvedParentName)->resolve($this->namespace, $this->namespaceImportTable); } - if ($final) { + if (!$final) { $this->namespaceImportTable[self::STATIC] = $this->namespaceImportTable[self::SELF]; } }
infection (8.1): src/NameContext/NameContext.php#L161
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } public function leaveClass() : void { - $this->inClass = false; + $this->inClass = true; unset($this->namespaceImportTable[self::SELF], $this->namespaceImportTable[self::PARENT], $this->namespaceImportTable[self::STATIC]); } public function leaveNamespace() : void