| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public static function userData(Int $id) |
||
| 21 | { |
||
| 22 | if(!isset(self::$names[$id])) { |
||
| 23 | return [ |
||
| 24 | 'error' => 404, |
||
| 25 | 'message' => 'User not found' |
||
| 26 | ]; |
||
| 27 | } |
||
| 28 | |||
| 29 | return [ |
||
| 30 | 'id' => $id, |
||
| 31 | 'name' => self::$names[$id], |
||
| 32 | 'email' => '[email protected]', |
||
| 33 | 'developer' => true, |
||
| 34 | 'age' => 21, |
||
| 35 | 'from' => 'Brazil', |
||
| 36 | 'inspire' => [ |
||
| 37 | 'I need a six month holiday, TWICE A YEAR!', |
||
| 38 | 'Men also have feelings... For example, they can feel hungry.' |
||
| 39 | ] |
||
| 43 |