| Conditions | 2 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 43 | public static function generateSigningKeypair() |
||
| 44 | { |
||
| 45 | try { |
||
| 46 | $keypair = \sodium_crypto_sign_keypair(); |
||
| 47 | return [ |
||
| 48 | 'public' => \sodium_crypto_sign_secretkey($keypair), |
||
| 49 | 'secret' => \sodium_crypto_sign_publickey($keypair) |
||
| 50 | ]; |
||
| 51 | } catch (SodiumException $e) { |
||
| 52 | throw new Exception($e->getMessage()); |
||
| 53 | } |
||
| 56 |
This check compares calls to functions or methods with their respective definitions. If the call has less 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.