iranianpep/code-jetter

View on GitHub
core/RouteInfo.php

Summary

Maintainability
A
3 hrs
Test Coverage

RouteInfo has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class RouteInfo
{
    private $routeType;
    private $requestMethod;
    private $url;
Severity: Minor
Found in core/RouteInfo.php - About 2 hrs to fix

    Method __construct has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $routeType,
            $requestMethod,
            $url,
            $component,
            $controller,
    Severity: Major
    Found in core/RouteInfo.php - About 1 hr to fix

      The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10.
      Open

          public function __construct(
              $routeType,
              $requestMethod,
              $url,
              $component,
      Severity: Minor
      Found in core/RouteInfo.php by phpmd

      The 'getCheckAntiCSRFToken()' method which returns a boolean should be named 'is...()' or 'has...()'
      Open

          public function getCheckAntiCSRFToken()
          {
              return !isset($this->checkAntiCSRFToken) ? false : $this->checkAntiCSRFToken;
          }
      Severity: Minor
      Found in core/RouteInfo.php by phpmd

      BooleanGetMethodName

      Since: 0.2

      Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

      Example

      class Foo {
          /**
           * @return boolean
           */
          public function getFoo() {} // bad
          /**
           * @return bool
           */
          public function isFoo(); // ok
          /**
           * @return boolean
           */
          public function getFoo($bar); // ok, unless checkParameterizedMethods=true
      }

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

      There are no issues that match your filters.

      Category
      Status