| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | public function login(string $name): string |
||
| 45 | { |
||
| 46 | if (array_key_exists($name, $this->users)){ |
||
| 47 | if (!$this->authenticated) { |
||
| 48 | $this->authenticated = true; |
||
| 49 | |||
| 50 | return sprintf("%s is authenticated \n", $name); |
||
| 51 | } |
||
| 52 | |||
| 53 | return sprintf("%s was already authenticated \n", $name); |
||
| 54 | } |
||
| 55 | |||
| 56 | return sprintf("%s must be registered \n", $name); |
||
| 57 | } |
||
| 59 |