Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class EncryptionAlgorithmParameter extends JWTParameter |
||
15 | { |
||
16 | use StringParameterValue; |
||
17 | |||
18 | /** |
||
19 | * Constructor. |
||
20 | * |
||
21 | * @param string $algo Algorithm name |
||
22 | */ |
||
23 | 44 | public function __construct(string $algo) |
|
24 | { |
||
25 | 44 | parent::__construct(self::PARAM_ENCRYPTION_ALGORITHM, $algo); |
|
1 ignored issue
–
show
|
|||
26 | 44 | } |
|
27 | |||
28 | /** |
||
29 | * Initialize from EncryptionAlgorithmParameterValue. |
||
30 | * |
||
31 | * @param EncryptionAlgorithmParameterValue $value |
||
32 | * |
||
33 | * @return self |
||
34 | */ |
||
35 | 17 | public static function fromAlgorithm( |
|
39 | } |
||
40 | } |
||
41 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.