chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Security/Authenticator/OAuth2/AbstractAuthenticator.php

Summary

Maintainability
A
0 mins
Test Coverage

The class AbstractAuthenticator has a coupling between objects value of 17. Consider to reduce the number of dependencies under 13.
Open

abstract class AbstractAuthenticator extends OAuth2Authenticator implements AuthenticationEntryPointInterface
{
    protected string $providerName = '';

    protected OAuth2ClientInterface $client;

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Avoid unused parameters such as '$authException'.
Open

    public function start(Request $request, ?AuthenticationException $authException = null): Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$request'.
Open

    public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$request'.
Open

    public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$token'.
Open

    public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$request'.
Open

    public function start(Request $request, ?AuthenticationException $authException = null): Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$request'.
Open

    public function authenticate(Request $request): Passport

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$firewallName'.
Open

    public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Missing class doc comment
Open

abstract class AbstractAuthenticator extends OAuth2Authenticator implements AuthenticationEntryPointInterface

Add a single space around assignment operators
Open

declare(strict_types=1);

Missing function doc comment
Open

    public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response

Missing function doc comment
Open

    abstract public function supports(Request $request): ?bool;

Missing function doc comment
Open

    public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response

Missing function doc comment
Open

    public function start(Request $request, ?AuthenticationException $authException = null): Response

Missing function doc comment
Open

    public function __construct(

Missing function doc comment
Open

    public function authenticate(Request $request): Passport

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly AccessUrlHelper $urlHelper,

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly EntityManagerInterface $entityManager,

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly RouterInterface $router,

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly ClientRegistry $clientRegistry,

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly UserRepository $userRepository,

Line indented incorrectly; expected 4 spaces, found 8
Open

        protected readonly AuthenticationConfigHelper $authenticationConfigHelper,

There are no issues that match your filters.

Category
Status