Conditions | 7 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 0 |
1 | <?php |
||
50 | public static function testTruthy($a) |
||
51 | { |
||
52 | foreach ($a as $value) { |
||
53 | if (is_array($value) || $value instanceof \Traversable) { |
||
54 | if (self::testTruthy($value)) { |
||
55 | return true; |
||
56 | } |
||
57 | } else { |
||
58 | if ($value !== '' && $value !== null) { |
||
59 | return true; |
||
60 | } |
||
61 | } |
||
62 | } |
||
63 | |||
64 | return false; |
||
65 | } |
||
66 | } |
||
67 |