Showing 129 of 129 total issues

Method rightJoin has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function rightJoin(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface
Severity: Minor
Found in classes/Model/Request/Request.php - About 35 mins to fix

    Method compare has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function compare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface
    Severity: Minor
    Found in classes/Model/Request/Where/Where.php - About 35 mins to fix

      Method rightJoin has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function rightJoin(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface;
      Severity: Minor
      Found in classes/Model/Request/RequestInterface.php - About 35 mins to fix

        Method addBetween has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected function addBetween(string $join, bool $positive, $identifier, $min, $max): void
        Severity: Minor
        Found in classes/Model/Request/Where/Where.php - About 35 mins to fix

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

              public function __construct(int $elapsedTime, int $memoryChange, int $memoryPeak, int $memorySystemPeak, string $title = 'Result')
          Severity: Minor
          Found in classes/Support/Performance/PerformanceResult.php - About 35 mins to fix

            Method compare has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function compare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface;
            Severity: Minor
            Found in classes/Model/Request/Where/WhereInterface.php - About 35 mins to fix

              Method orCompare has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function orCompare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface;
              Severity: Minor
              Found in classes/Model/Request/Where/WhereInterface.php - About 35 mins to fix

                Method join has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function join(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface
                Severity: Minor
                Found in classes/Model/Request/Request.php - About 35 mins to fix

                  Function routeParameters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function routeParameters(string $name, array $parameters): array
                      {
                          $replaces = [];
                  
                          foreach ($this->routeUris[$name][static::ROUTE_URI_PARAMETERS] as $key => $required) {
                  Severity: Minor
                  Found in classes/Delivery/Node/HttpRouterHub.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function itemsInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function itemsInfo(array $var, string $color = '#444'): string
                      {
                          $result = PHP_EOL;
                  
                          foreach ($var as $key => $value) {
                  Severity: Minor
                  Found in classes/Support/VariableInspector.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function run(): ApplicationInterface
                      {
                          $resourceManager = $this->resourceManager;
                  
                          try {
                  Severity: Minor
                  Found in classes/Application/Application.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function expressionToString has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function expressionToString($expression, SentenceInterface $sentence): string
                      {
                          if (is_array($expression)) {
                              return $this->expressionArrayToString($expression, $sentence);
                          }
                  Severity: Minor
                  Found in classes/Model/Storage/Grammar/AbstractGrammar.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function orderByToString has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function orderByToString(array $orderBy, SentenceInterface $sentence): string
                      {
                          if ($orderBy) {
                              $list = [];
                  
                  
                  Severity: Minor
                  Found in classes/Model/Storage/Grammar/AbstractGrammar.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function debugDescription has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function debugDescription(): string
                      {
                          if (method_exists($this, '__debugInfo')) {
                              $items = $this->__debugInfo();
                          }
                  Severity: Minor
                  Found in classes/Support/DebugDescriptionTrait.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function processFiles has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function processFiles(ResourceManagerInterface $resourceManager, $name, $type, $tempFilename, $error, $size): ?array
                      {
                          // Items
                          if (is_array($name)) {
                              $items = [];
                  Severity: Minor
                  Found in classes/Delivery/Cargo/Factory/HttpCargoFactory.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function addItems has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function addItems(Where $where, array $array): void
                      {
                          foreach ($array as $key => $value) {
                              if (is_numeric($key)) {
                                  $where->sub($value);
                  Severity: Minor
                  Found in classes/Model/Request/Where/Where.php - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Missing class import via use statement (line '79', column '32').
                  Open

                          $this->memcached = new \Memcached($this->persistentId);

                  MissingImport

                  Since: 2.7.0

                  Importing all external classes in a file through use statements makes them clearly visible.

                  Example

                  function make() {
                      return new \stdClass();
                  }

                  Source http://phpmd.org/rules/cleancode.html#MissingImport

                  Missing class import via use statement (line '22', column '27').
                  Open

                          $reflection = new \ReflectionFunction($function);
                  Severity: Minor
                  Found in classes/Support/CodeInspector.php by phpmd

                  MissingImport

                  Since: 2.7.0

                  Importing all external classes in a file through use statements makes them clearly visible.

                  Example

                  function make() {
                      return new \stdClass();
                  }

                  Source http://phpmd.org/rules/cleancode.html#MissingImport

                  Missing class import via use statement (line '178', column '65').
                  Open

                          $this->memcached->set($key, $value, $seconds > 0 ? (new \DateTimeImmutable("now +$seconds seconds"))->getTimestamp() : $seconds);

                  MissingImport

                  Since: 2.7.0

                  Importing all external classes in a file through use statements makes them clearly visible.

                  Example

                  function make() {
                      return new \stdClass();
                  }

                  Source http://phpmd.org/rules/cleancode.html#MissingImport

                  Missing class import via use statement (line '61', column '29').
                  Open

                          $dataByObject = new \SplObjectStorage();

                  MissingImport

                  Since: 2.7.0

                  Importing all external classes in a file through use statements makes them clearly visible.

                  Example

                  function make() {
                      return new \stdClass();
                  }

                  Source http://phpmd.org/rules/cleancode.html#MissingImport

                  Severity
                  Category
                  Status
                  Source
                  Language