PlumeSolution/user-bundle

View on GitHub

Showing 83 of 83 total issues

Avoid variables with short names like $em. Configured minimum length is 3.
Open

        $em = $this->doctrine->getManager();
Severity: Minor
Found in src/Manager/UserManager.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $em. Configured minimum length is 3.
Open

        $em = $this->doctrine->getManager();
Severity: Minor
Found in src/Manager/UserManager.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public $id;
Severity: Minor
Found in src/Models/BaseUser.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function setId($id): self
Severity: Minor
Found in src/Models/BaseUser.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid unused parameters such as '$options'.
Open

    public function buildForm(FormBuilderInterface $builder, array $options): void
Severity: Minor
Found in src/Form/LoginType.php by phpmd

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 assigning values to variables in if clauses and the like (line '75', column '23').
Open

    public function removeRole(string $role): self
    {
        if (false !== $key = array_search(strtoupper($role), $this->roles, true))
        {
            unset($this->roles[$key]);
Severity: Minor
Found in src/Fields/RolesTrait.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

Avoid unused local variables such as '$config'.
Open

        $config = $this->processConfiguration($configuration, $configs);

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Expected 1 space after closing parenthesis; found 9
Open

        if ($this->isGranted('IS_AUTHENTICATED_FULLY'))

Expected 1 space after closing parenthesis; found 9
Open

        if (!in_array($role, $this->roles, true))
Severity: Minor
Found in src/Fields/RolesTrait.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 9
Open

        if (false !== $key = array_search(strtoupper($role), $this->roles, true))
Severity: Minor
Found in src/Fields/RolesTrait.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 9
Open

        if ($form->isSubmitted() && $form->isValid())

Expected 1 space after closing parenthesis; found 9
Open

        if ($role === BaseUser::ROLE_DEFAULT)
Severity: Minor
Found in src/Fields/RolesTrait.php by phpcodesniffer

Parameter $user has undeclared type \Symfony\Component\Security\Core\User\UserInterface
Open

    public function isEqualTo(UserInterface $user): bool
Severity: Minor
Found in src/Fields/EqualTrait.php by phan

Reference to constant class from undeclared class \Symfony\Component\Form\Extension\Core\Type\SubmitType
Open

        $builder->add('submit', SubmitType::class);
Severity: Critical
Found in src/Form/LoginType.php by phan

Call to undeclared method \PlumeSolution\UserBundle\Controllers\LoginController::redirectToRoute
Open

        return $this->redirectToRoute('index');
Severity: Critical
Found in src/Controllers/LoginController.php by phan

Call to method createView from undeclared class \Symfony\Component\Form\FormInterface
Open

        return $this->render('@PSUser/Login/login.html.twig', ['form' => $form->createView()]);
Severity: Critical
Found in src/Controllers/LoginController.php by phan

Reference to undeclared property \PlumeSolution\UserBundle\Credentials\NicknamePasswordTrait->nickname
Open

        return $this->nickname;

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('remember', CheckboxType::class);
Severity: Critical
Found in src/Form/LoginType.php by phan

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('submit', SubmitType::class);
Severity: Critical
Found in src/Form/LoginType.php by phan

Reference to undeclared property \PlumeSolution\UserBundle\Fields\EqualTrait->nickname
Open

            $this->nickname,
Severity: Minor
Found in src/Fields/EqualTrait.php by phan
Severity
Category
Status
Source
Language