| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public static function process_severity($severity) : string |
||
| 28 | { |
||
| 29 | // Stringified PHP severities out of \debug_backtrace() like "notice" |
||
| 30 | if (is_string($severity)) { |
||
| 31 | $level = self::from_error($severity); |
||
| 32 | // De-facto PHP severities as constants (ints) like E_NOTICE |
||
| 33 | } elseif (is_numeric($severity)) { |
||
| 34 | $level = Severity::fromError($severity); |
||
| 35 | } else { |
||
| 36 | // "Other" |
||
| 37 | $level = Severity::ERROR; |
||
| 38 | } |
||
| 39 | |||
| 40 | return strtolower($level); |
||
| 41 | } |
||
| 42 | |||
| 83 |