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 |
||
33 | protected function filterInterval($value) |
||
34 | { |
||
35 | if (!is_string($value) || is_numeric($value) || empty($value)) { |
||
36 | return $value; |
||
37 | } |
||
38 | |||
39 | if (strlen($value) == 1) { |
||
40 | return $value; |
||
41 | } |
||
42 | |||
43 | try { |
||
44 | return new DateTime($value); |
||
45 | } catch (Exception $e) { |
||
46 | // Pokémon Exception Handling |
||
47 | } |
||
48 | |||
49 | return $value; |
||
50 | } |
||
51 | } |
||
52 |