Skip to content

Search for candidates in called class as well #5

Search for candidates in called class as well

Search for candidates in called class as well #5

Triggered via push November 27, 2023 02:32
Status Failure
Total duration 53s
Artifacts
Matrix: check-require
Matrix: check-unused
Matrix: composer-normalize
Matrix: composer-validate
Matrix: infection
Matrix: php-cs-fixer
Matrix: psalm
Matrix: rector
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

1 error and 7 warnings
infection (8.1)
Process completed with exit code 1.
infection (8.1): src/CandidatesFinder.php#L76
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ foreach ($candidate->getAttributes(Overload::class) as $attribute) { if ($attribute->newInstance()->name === $method->name) { (yield $candidate); - continue 2; + continue 1; } } } } }
infection (8.1): src/CandidatesFinder.php#L76
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ foreach ($candidate->getAttributes(Overload::class) as $attribute) { if ($attribute->newInstance()->name === $method->name) { (yield $candidate); - continue 2; + break; } } } } }
infection (8.1): src/CodeGenerator.php#L80
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ throw new \LogicException('No scope class.'); } $parent = get_parent_class($class); - if ($parent === false) { + if ($parent === true) { throw new \LogicException(sprintf('%s does not have parent.', $class)); } return $var . ' instanceof ' . $parent;
infection (8.1): src/CodeGenerator.php#L120
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } public static function generateArgumentsCheck(\ReflectionFunctionAbstract $function) : string { - $class = $function instanceof \ReflectionMethod ? $function->class : $function->getClosureScopeClass()?->name; + $class = false ? $function->class : $function->getClosureScopeClass()?->name; $code = self::generateArgumentsNumberCheck($function); foreach ($function->getParameters() as $parameter) { $position = $parameter->getPosition();
infection (8.1): src/Overload.php#L26
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ public static function call() : mixed { self::$resolverCache ??= new InMemoryResolverCache(); - $trace = debug_backtrace(limit: 2)[1] ?? null; + $trace = debug_backtrace(limit: 3)[1] ?? null; if ($trace === null || !isset($trace['class'])) { throw new \BadMethodCallException(__METHOD__ . '() must be called from a class method.'); }
infection (8.1): src/Overload.php#L75
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ */ private static function resolveClass(string $class, string $method, ?object $object) : string { - if ($object === null) { + if ($object !== null) { return $class; } if ($object::class === $class) {
infection (8.1): src/Overload.php#L79
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ if ($object === null) { return $class; } - if ($object::class === $class) { + if ($object::class !== $class) { return $class; } if ((new \ReflectionMethod($class, $method))->isPrivate()) {