Perormance optimization #1160
Annotations
10 warnings
mutation / PHP 8.3-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.3-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.3-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.3-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.3-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.3-ubuntu-latest:
src/ContainerConfig.php#L76
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
/**
* @param bool $validate Whether definitions should be validated immediately.
*/
- public function withValidate(bool $validate = true) : self
+ public function withValidate(bool $validate = false) : self
{
$new = clone $this;
$new->validate = $validate;
|
mutation / PHP 8.3-ubuntu-latest:
src/ContainerConfig.php#L78
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withValidate(bool $validate = true) : self
{
- $new = clone $this;
+ $new = $this;
$new->validate = $validate;
return $new;
}
|
mutation / PHP 8.3-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.3-ubuntu-latest:
src/ContainerConfig.php#L109
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
* @param bool $useStrictMode If the automatic addition of definition when class exists and can be resolved
* is disabled.
*/
- public function withStrictMode(bool $useStrictMode = true) : self
+ public function withStrictMode(bool $useStrictMode = false) : self
{
$new = clone $this;
$new->useStrictMode = $useStrictMode;
|
mutation / PHP 8.3-ubuntu-latest:
src/ContainerConfig.php#L111
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withStrictMode(bool $useStrictMode = true) : self
{
- $new = clone $this;
+ $new = $this;
$new->useStrictMode = $useStrictMode;
return $new;
}
|