brokencube/circuit

View on GitHub
src/RouteCollector.php

Summary

Maintainability
A
0 mins
Test Coverage

Doc-block of $middleware in __construct contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[]  $middleware     Array of middle ware to apply to all routes
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in get contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in addRoute contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in addGroup contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  Middleware to be added to all routes in this group
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in head contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in post contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in delete contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Possibly zero references to use statement for classlike/namespace Request (\Symfony\Component\HttpFoundation\Request)
Open

use Symfony\Component\HttpFoundation\Request;
Severity: Minor
Found in src/RouteCollector.php by phan

Possibly zero references to use statement for classlike/namespace Response (\Symfony\Component\HttpFoundation\Response)
Open

use Symfony\Component\HttpFoundation\Response;
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in put contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Doc-block of $middleware in patch contains phpdoc param type \Circuit\Interfaces\Middleware which is incompatible with the param type array declared in the signature
Open

     * @param Middleware|string[] $middleware  List of middleware (Middleware objects or named middleware) to add to
Severity: Minor
Found in src/RouteCollector.php by phan

Avoid excessively long variable names like $previousMiddlewareStack. Keep variable name length under 20.
Open

        $previousMiddlewareStack = $this->middlewareStack;
Severity: Minor
Found in src/RouteCollector.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

There are no issues that match your filters.

Category
Status