GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ValidNewPassword   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 36
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPwdValidator() 0 3 1
A __construct() 0 6 1
A getConfig() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LM\AuthAbstractor\Form\Constraint;
6
7
use LM\AuthAbstractor\Configuration\IApplicationConfiguration;
8
use LM\AuthAbstractor\Validator\PasswordValidator;
9
use Symfony\Component\Validator\Constraint;
10
11
/**
12
 * A constraint checking the given password meets the criteria specified in the
13
 * application configuration.
14
 *
15
 * @see \LM\AuthAbstractor\Challenge\PasswordUpdateChallenge
16
 * @see \LM\AuthAbstractor\Configuration\IApplicationConfiguration
17
 */
18
class ValidNewPassword extends Constraint
19
{
20
    /** @var IApplicationConfiguration */
21
    private $appConfig;
22
23
    /** @var PasswordValidator */
24
    private $pwdValidator;
25
26
    /**
27
     * @internal
28
     */
29
    public function __construct(
30
        IApplicationConfiguration $appConfig,
31
        PasswordValidator $pwdValidator
32
    ) {
33
        $this->appConfig = $appConfig;
34
        $this->pwdValidator = $pwdValidator;
35
    }
36
37
    /**
38
     * @return IApplicationConfiguration The configuration of the application.
39
     */
40
    public function getConfig(): IApplicationConfiguration
41
    {
42
        return $this->appConfig;
43
    }
44
45
    /**
46
     * @return PasswordValidator The PasswordValidator instance used for
47
     * validating the password in ValidNewPasswordValidator.
48
     *
49
     * @see ValidNewPasswordValidator
50
     */
51
    public function getPwdValidator(): PasswordValidator
52
    {
53
        return $this->pwdValidator;
54
    }
55
}
56