Total Complexity | 1 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class LogLevel |
||
8 | { |
||
9 | const EMERGENCY = 'emergency'; |
||
10 | const ALERT = 'alert'; |
||
11 | const CRITICAL = 'critical'; |
||
12 | const ERROR = 'error'; |
||
13 | const WARNING = 'warning'; |
||
14 | const NOTICE = 'notice'; |
||
15 | const INFO = 'info'; |
||
16 | const DEBUG = 'debug'; |
||
17 | |||
18 | protected static $levels = ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency']; |
||
19 | |||
20 | /** |
||
21 | * 比较优先级 |
||
22 | * |
||
23 | * @param string $a |
||
24 | * @param string $b |
||
25 | * @return integer |
||
26 | */ |
||
27 | public static function compare(string $a, string $b): int |
||
34 |