abbadon1334/atk4-fastroute

View on GitHub

Showing 3 of 3 total issues

Method getHandlerFromArray has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

private static function getHandlerFromArray(array $handler_array, ?callable $callbackOnBefore, ?callable $callbackOnAfter): iOnRoute
{
$handler = null;
 
$first_element = $handler_array[0];
Severity: Minor
Found in src/Route/Route.php - About 1 hr to fix

    Method handleRouteRequest has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    protected function handleRouteRequest(RequestInterface $request = null): bool
    {
    $dispatcher = $this->getDispatcher();
     
    $request = $request ?? ServerRequestFactory::fromGlobals();
    Severity: Minor
    Found in src/Router.php - About 1 hr to fix

      Function getHandlerFromArray has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      private static function getHandlerFromArray(array $handler_array, ?callable $callbackOnBefore, ?callable $callbackOnAfter): iOnRoute
      {
      $handler = null;
       
      $first_element = $handler_array[0];
      Severity: Minor
      Found in src/Route/Route.php - About 55 mins to fix
      Severity
      Category
      Status
      Source
      Language