Function resolveParameters
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
protected function resolveParameters(array $refParameters, array $arguments): array
{
$parameters = [];
$nullable = 0;
- 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
Method resolveParameters
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function resolveParameters(array $refParameters, array $arguments): array
{
$parameters = [];
$nullable = 0;
Function __invoke
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(mixed $handler, array $arguments): mixed
{
if (\is_string($handler)) {
$handler = \ltrim($handler, '\\');
- 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
Method resolveRoute
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function resolveRoute(
ServerRequestInterface $request,
callable $resolver,
mixed $handler,
callable $arguments,
Function resolveRoute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function resolveRoute(
ServerRequestInterface $request,
callable $resolver,
mixed $handler,
callable $arguments,
- 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
Method __invoke
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __invoke(mixed $handler, array $arguments): mixed
{
if (\is_string($handler)) {
$handler = \ltrim($handler, '\\');
Avoid too many return
statements within this method. Open
return \json_encode($response, \JSON_THROW_ON_ERROR) ?: null;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $response;