Showing 197 of 197 total issues
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message = '', ?int $code = null, ?Throwable $previous = null, ?int $status = 404, ?array $params = [], ?array $solutions = [])
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($message = '', ?int $code = null, ?Throwable $previous = null, ?int $status = 500, ?array $params = [], ?array $solutions = [])
Method generateException
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function generateException($message = '', ?int $code = null, ?Throwable $previous = null, ?array $params = [], ?array $solutions = []): Throwable
Method generateException
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function generateException($message = '', ?int $code = null, ?Throwable $previous = null, ?array $params = [], ?array $solutions = []): Throwable
Expected 1 blank line at end of file; 4 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Visibility must be declared on method "__invoke" Open
Open
function __invoke(ServerRequestInterface $request, ResponseInterface $response, UnitTrackerInterface $unitTracker)
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Function getIpAddress
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function getIpAddress(RequestInterface $request): string
{
if (! ($request instanceof ServerRequestInterface)) {
return "-";
}
- Read upRead up
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
Open
public function __invoke(RequestInterface $request, UnitTrackerInterface $unitTracker)
{
$uri = $request->getUri();
$requestPath = $uri->getPath();
$method = $request->getMethod();
- Read upRead up
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
Open
namespace Pluf\Core\Exception;
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks