| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | class LocalAuthentificator implements IAuthentificator { |
||
| 29 | |||
| 30 | public function __construct() { |
||
| 31 | // |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * check password of user |
||
| 36 | * |
||
| 37 | * @param $username string name of user |
||
| 38 | * @param $password string password of user |
||
| 39 | * |
||
| 40 | * @return true, if password is correct |
||
| 41 | */ |
||
| 42 | public function checkPassword(string $username, string $password): bool { |
||
| 43 | // TODO: Implement checkPassword() method. |
||
| 44 | } |
||
|
|
|||
| 45 | |||
| 46 | /** |
||
| 47 | * check, if username exists |
||
| 48 | * |
||
| 49 | * @param $username string name of user |
||
| 50 | * |
||
| 51 | * @return true, if username exists |
||
| 52 | */ |
||
| 53 | public function exists(string $username): bool { |
||
| 60 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: