Showing 197 of 197 total issues

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

    public function __construct($message = '', ?int $code = null, ?Throwable $previous = null, ?int $status = 404, ?array $params = [], ?array $solutions = [])
Severity: Minor
Found in src/Exception/ResourceNotFoundException.php - About 45 mins to fix

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

        public function __construct($message = '', ?int $code = null, ?Throwable $previous = null, ?int $status = 500, ?array $params = [], ?array $solutions = [])
    Severity: Minor
    Found in src/Exception.php - About 45 mins to fix

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

          protected function generateException($message = '', ?int $code = null, ?Throwable $previous = null, ?array $params = [], ?array $solutions = []): Throwable
      Severity: Minor
      Found in src/Process/Entity/UpdateEntity.php - About 35 mins to fix

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

            protected function generateException($message = '', ?int $code = null, ?Throwable $previous = null, ?array $params = [], ?array $solutions = []): Throwable
        Severity: Minor
        Found in src/Process/Entity/ReadEntity.php - About 35 mins to fix

          Expected 1 blank line at end of file; 4 found
          Open

          }
          Severity: Minor
          Found in src/Exception.php by phpcodesniffer

          Expected 1 blank line at end of file; 2 found
          Open

          }
          Severity: Minor
          Found in src/CollectionQuery.php by phpcodesniffer

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Expected 1 blank line at end of file; 2 found
          Open

          }
          Severity: Minor
          Found in src/ExceptionBuilder.php by phpcodesniffer

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Visibility must be declared on method "__invoke"
          Open

              function __invoke(ServerRequestInterface $request, ResponseInterface $response, UnitTrackerInterface $unitTracker)

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Expected 1 blank line at end of file; 2 found
          Open

          }

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

              public static function getIpAddress(RequestInterface $request): string
              {
                  if (! ($request instanceof ServerRequestInterface)) {
                      return "-";
                  }
          Severity: Minor
          Found in src/Process/Http/AccessLog.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 __invoke has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function __invoke(RequestInterface $request, UnitTrackerInterface $unitTracker)
              {
                  $uri = $request->getUri();
                  $requestPath = $uri->getPath();
                  $method = $request->getMethod();
          Severity: Minor
          Found in src/Process/Http/IfPathAndMethodIs.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

          There must be one blank line after the namespace declaration
          Open

          namespace Pluf\Core\Exception;

          Expected 1 blank line at end of file; 2 found
          Open

          }

          Expected 1 blank line at end of file; 2 found
          Open

          }

          The closing brace for the class must go on the next line after the body
          Open

          }
          Severity
          Category
          Status
          Source
          Language