Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | protected function getFlattenedCriteriaData(array $criteriaByType) |
||
39 | { |
||
40 | $criteria = []; |
||
41 | foreach ($criteriaByType as $type => $criterion) { |
||
42 | if (!is_array($criterion) || !$this->isZeroBasedArray($criterion)) { |
||
43 | $criterion = [$criterion]; |
||
44 | } |
||
45 | |||
46 | foreach ($criterion as $criterionElement) { |
||
47 | $criteria[] = [ |
||
48 | 'type' => $type, |
||
49 | 'data' => $criterionElement, |
||
50 | ]; |
||
51 | } |
||
52 | } |
||
53 | |||
54 | return $criteria; |
||
55 | } |
||
56 | |||
71 |