| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function authenticateEntity($correctPassphrase, $suppliedPassphrase) |
||
| 32 | { |
||
| 33 | if (!is_string($correctPassphrase)) { |
||
|
1 ignored issue
–
show
|
|||
| 34 | throw new \InvalidArgumentException( |
||
| 35 | 'The correct token value for verification must be a string or a binary string.' |
||
| 36 | ); |
||
| 37 | } elseif (!is_string($suppliedPassphrase)) { |
||
|
1 ignored issue
–
show
|
|||
| 38 | throw new \InvalidArgumentException( |
||
| 39 | 'The supplied user token value must be a string or a binary string.' |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | return hash_equals($correctPassphrase, $suppliedPassphrase); |
||
| 44 | } |
||
| 46 |