| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class SplashMessage |
||
| 11 | { |
||
| 12 | protected static array $messages = [ |
||
| 13 | 'Over 9000 avatars!!', |
||
| 14 | 'Serving since 2013', |
||
| 15 | 'Just select and copy the URL, come on!', |
||
| 16 | 'How can I help you?', |
||
| 17 | 'RTFM!', |
||
| 18 | 'Whoooooops!', |
||
| 19 | 'Many avatars, Wow!', |
||
| 20 | ]; |
||
| 21 | |||
| 22 | protected static array $messages404 = [ |
||
| 23 | 'Oooops! 404 :(', |
||
| 24 | 'Page is gone', |
||
| 25 | 'This page has been stolen by an Enderman', |
||
| 26 | 'This page has a drop rate of 0%', |
||
| 27 | 'This is not a page', |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * get random message. |
||
| 32 | */ |
||
| 33 | public static function get(): string |
||
| 34 | { |
||
| 35 | return self::$messages[array_rand(self::$messages)]; |
||
| 36 | } |
||
| 37 | |||
| 38 | public static function get404(): string |
||
| 41 | } |
||
| 42 | } |
||
| 43 |