We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 6 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function filterInterval($value) |
||
| 29 | { |
||
| 30 | if (!is_string($value) || is_numeric($value) || empty($value)) { |
||
| 31 | return $value; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (strlen($value) == 1) { |
||
| 35 | return $value; |
||
| 36 | } |
||
| 37 | |||
| 38 | try { |
||
| 39 | return new DateTime($value); |
||
| 40 | } catch (Exception $e) { |
||
| 41 | // Pokémon Exception Handling |
||
| 42 | } |
||
| 43 | |||
| 44 | return $value; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |