New syntax #867
Annotations
1 error and 10 warnings
|
src/Builder/GroupBuilder.php#L133
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
public function hosts(string ...$hosts) : self
{
$new = clone $this;
- $new->hosts = array_values($hosts);
+ $new->hosts = $hosts;
return $new;
}
/**
|
src/Builder/RouteBuilder.php#L119
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
public function hosts(string ...$hosts) : self
{
$route = clone $this;
- $route->hosts = array_values($hosts);
+ $route->hosts = $hosts;
return $route;
}
/**
|
src/Group.php#L95
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
return $this->disabledMiddlewares;
}
- public function setRoutes(array $routes) : self
+ protected function setRoutes(array $routes) : self
{
$this->assertRoutes($routes);
$this->routes = $routes;
|
src/Group.php#L199
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
private function assertRoutes(array $routes) : void
{
/** @var Group|RoutableInterface|Route $route */
- foreach ($routes as $route) {
+ foreach (array() as $route) {
if ($route instanceof Route || $route instanceof self || $route instanceof RoutableInterface) {
continue;
}
|
src/Group.php#L200
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
{
/** @var Group|RoutableInterface|Route $route */
foreach ($routes as $route) {
- if ($route instanceof Route || $route instanceof self || $route instanceof RoutableInterface) {
+ if ($route instanceof Route && $route instanceof self || $route instanceof RoutableInterface) {
continue;
}
throw new \InvalidArgumentException('Invalid $routes provided, array of `Route` or `Group` or `RoutableInterface` instance expected.');
|
src/Group.php#L201
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
/** @var Group|RoutableInterface|Route $route */
foreach ($routes as $route) {
if ($route instanceof Route || $route instanceof self || $route instanceof RoutableInterface) {
- continue;
+ break;
}
throw new \InvalidArgumentException('Invalid $routes provided, array of `Route` or `Group` or `RoutableInterface` instance expected.');
}
}
}
|
src/Route.php#L65
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* It is useful to avoid invoking one of the parent group middleware for
* a certain route.
*/
- public function __construct(array $methods, private string $pattern, private ?string $name = null, array|callable|string $action = null, array $middlewares = [], array $defaults = [], array $hosts = [], private bool $override = false, private array $disabledMiddlewares = [])
+ public function __construct(array $methods, private string $pattern, private ?string $name = null, array|callable|string $action = null, array $middlewares = [], array $defaults = [], array $hosts = [], private bool $override = true, private array $disabledMiddlewares = [])
{
if (empty($methods)) {
throw new InvalidArgumentException('$methods cannot be empty.');
|
src/Route.php#L147
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
}
return $this->enabledMiddlewaresCache;
}
- public function setMethods(array $methods) : self
+ protected function setMethods(array $methods) : self
{
$this->assertListOfStrings($methods, 'methods');
$this->methods = $methods;
|
src/Route.php#L187
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
{
/** @var mixed $value */
foreach ($defaults as $key => $value) {
- if (!is_scalar($value) && !$value instanceof Stringable) {
+ if (!is_scalar($value) && $value instanceof Stringable) {
throw new \InvalidArgumentException('Invalid $defaults provided, list of scalar or `Stringable` instance expected.');
}
$this->defaults[$key] = (string) $value;
|
src/Route.php#L187
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
--- Original
+++ New
@@ @@
{
/** @var mixed $value */
foreach ($defaults as $key => $value) {
- if (!is_scalar($value) && !$value instanceof Stringable) {
+ if (is_scalar($value) && $value instanceof Stringable) {
throw new \InvalidArgumentException('Invalid $defaults provided, list of scalar or `Stringable` instance expected.');
}
$this->defaults[$key] = (string) $value;
|
The logs for this run have expired and are no longer available.
Loading