Conditions | 8 |
Paths | 6 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public static function formKeyPartials($array) |
||
43 | { |
||
44 | $array = static::prepareData($array); |
||
45 | $result = []; |
||
46 | foreach ((array)$array as $model => $values) { |
||
47 | if (is_array($values)) { |
||
48 | foreach ($values as $key => $value) { |
||
49 | if (is_array($value)) { |
||
50 | foreach ($value as $subKey => $subValue) { |
||
51 | $result[] = implode('=', [$model, is_numeric($key) ? $value : $key]); |
||
52 | break; |
||
53 | } |
||
54 | } else { |
||
55 | $result[] = implode('=', [$model, is_numeric($key) ? $value : $key]); |
||
56 | } |
||
57 | } |
||
58 | } |
||
59 | } |
||
60 | $result = array_unique($result); |
||
61 | sort($result); |
||
62 | return $result; |
||
63 | } |
||
64 | |||
80 | } |