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