Skip to content

Suggestion for lazy service #1050

Suggestion for lazy service

Suggestion for lazy service #1050

Triggered via pull request March 3, 2024 08:27
Status Success
Total duration 1m 12s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/CompositeContainer.php#L61
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ $tags = []; foreach ($this->containers as $container) { if (!$container instanceof Container) { - continue; + break; } if ($container->has($id)) { /** @psalm-suppress MixedArgument `Container::get()` always return array for tag */
mutation / PHP 8.1-ubuntu-latest: src/CompositeContainer.php#L84
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } catch (Throwable $t) { $hasException = true; $exceptions[] = [$t, $container]; - } finally { - if (!$hasException) { - $exceptions[] = [new RuntimeException('Container "has()" returned false, but no exception was thrown from "get()".'), $container]; - } + } + if (!$hasException) { + $exceptions[] = [new RuntimeException('Container "has()" returned false, but no exception was thrown from "get()".'), $container]; } } throw new CompositeNotFoundException($exceptions);
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L33
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withDefinitions(array $definitions) : self { - $new = clone $this; + $new = $this; $new->definitions = $definitions; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L48
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withProviders(array $providers) : self { - $new = clone $this; + $new = $this; $new->providers = $providers; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L63
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withTags(array $tags) : self { - $new = clone $this; + $new = $this; $new->tags = $tags; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L78
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withValidate(bool $validate) : self { - $new = clone $this; + $new = $this; $new->validate = $validate; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L95
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withDelegates(array $delegates) : self { - $new = clone $this; + $new = $this; $new->delegates = $delegates; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/ContainerConfig.php#L111
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withStrictMode(bool $useStrictMode) : self { - $new = clone $this; + $new = $this; $new->useStrictMode = $useStrictMode; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/Helpers/DefinitionParser.php#L103
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ continue; } // Methods and properties - if (count($methodArray = explode('()', $key, 2)) === 2) { + if (count($methodArray = explode('()', $key, 3)) === 2) { $methodsAndProperties[$key] = [ArrayDefinition::TYPE_METHOD, $methodArray[0], $value]; continue; }
mutation / PHP 8.1-ubuntu-latest: src/Helpers/DefinitionParser.php#L107
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $methodsAndProperties[$key] = [ArrayDefinition::TYPE_METHOD, $methodArray[0], $value]; continue; } - if (count($propertyArray = explode('$', $key, 2)) === 2) { + if (count($propertyArray = explode('$', $key, 3)) === 2) { $methodsAndProperties[$key] = [ArrayDefinition::TYPE_PROPERTY, $propertyArray[1], $value]; continue; }