Showing 27 of 27 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
UserProviderInterface $provider,
PasswordHasherFactoryInterface $hasherFactory,
RememberMeHandler $rememberMeHandler = null,
string $userParameter = '_identifier',
string $passwordParameter = '_password'
Function execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$errorIo = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
$input->isInteractive() ? $errorIo->title('Biurad User Utility') : $errorIo->newLine();
- 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 getPatterns
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPatterns(ServerRequestInterface $request): array
{
if (!$request instanceof ServerRequest) {
throw new \InvalidArgumentException(\sprintf('The request must be an instance of %s.', ServerRequest::class));
}
- 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 clearRememberMeCookies
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function clearRememberMeCookies(ServerRequestInterface $request): array
{
$cookies = [];
foreach ($request->getCookieParams() as $cookieName => $rawCookie) {
- 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 failure
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function failure(ServerRequestInterface $request, AuthenticationException $exception): ?ResponseInterface
{
$token =$this->tokenStorage->getToken();
if ($token instanceof PreAuthenticatedToken) {
- 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
Avoid too many return
statements within this method. Open
return null;
Function authenticate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate(ServerRequestInterface $request): bool
{
[$attributes, $channel] = $this->accessMap->getPatterns($request);
if ($channel && $channel !== $request->getUri()->getScheme()) {
- 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"