1 | <?php |
||
45 | class CAPICOM extends \RandomLib\AbstractSource |
||
46 | { |
||
47 | |||
48 | /** |
||
49 | * Return an instance of Strength indicating the strength of the source |
||
50 | * |
||
51 | * @return \SecurityLib\Strength An instance of one of the strength classes |
||
52 | */ |
||
53 | public static function getStrength() |
||
57 | |||
58 | /** |
||
59 | * If the source is currently available. |
||
60 | * Reasons might be because the library is not installed |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | public static function isSupported() |
||
68 | |||
69 | /** |
||
70 | * Generate a random string of the specified size |
||
71 | * |
||
72 | * @param int $size The size of the requested random string |
||
73 | * |
||
74 | * @return string A string of the requested size |
||
75 | */ |
||
76 | public function generate($size) |
||
89 | } |
||
90 |
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.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.