Adjust pretty name of closures on PHP 8.4 #471
Annotations
7 warnings
src/ArgumentException.php#L105
Escaped Mutant for Mutator "UnwrapArrayMap":
--- Original
+++ New
@@ @@
if ($type instanceof ReflectionUnionType) {
/** @var ReflectionNamedType[] $types */
$types = $type->getTypes();
- return implode('|', array_map(static fn(ReflectionNamedType $r) => $r->getName(), $types)) . ' ';
+ return implode('|', $types) . ' ';
}
if ($type instanceof ReflectionIntersectionType) {
/** @var ReflectionNamedType[] $types */
|
src/ArgumentException.php#L113
Escaped Mutant for Mutator "UnwrapArrayMap":
--- Original
+++ New
@@ @@
if ($type instanceof ReflectionIntersectionType) {
/** @var ReflectionNamedType[] $types */
$types = $type->getTypes();
- return implode('&', array_map(static fn(ReflectionNamedType $r) => $r->getName(), $types)) . ' ';
+ return implode('&', $types) . ' ';
}
return '';
}
}
|
src/Injector.php#L45
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
* Enable memoization of class reflections for improved performance when resolving the same objects multiple times.
* Note: Enabling this feature may increase memory usage.
*/
- public function withCacheReflections(bool $cacheReflections = true) : self
+ public function withCacheReflections(bool $cacheReflections = false) : self
{
$new = clone $this;
$new->cacheReflections = $cacheReflections;
|
src/Injector.php#L239
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
// Throw NotFoundExceptionInterface
throw $error;
}
- if ($isVariadic) {
+ if (!$isVariadic) {
return true;
}
return null;
|
src/Injector.php#L339
Escaped Mutant for Mutator "AssignCoalesce":
--- Original
+++ New
@@ @@
private function getClassReflection(string $class) : ReflectionClass
{
if ($this->cacheReflections) {
- return $this->reflectionsCache[$class] ??= new ReflectionClass($class);
+ return $this->reflectionsCache[$class] = new ReflectionClass($class);
}
return new ReflectionClass($class);
}
}
|
src/ResolvingState.php#L99
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
foreach ($generator as &$value) {
$this->addResolvedValue($value);
}
- return true;
+ return false;
}
/**
* Resolve parameter using type intersection rules.
|
src/ResolvingState.php#L121
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
if (!$variadic) {
return true;
}
- $resolved = true;
+ $resolved = false;
}
return $resolved;
}
|
This job succeeded
Loading