| Conditions | 8 |
| Paths | 6 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | public static function formKeyPartials($array) |
||
| 44 | { |
||
| 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[] = join('=', [$model, is_numeric($key) ? $value : $key]); |
||
| 52 | break; |
||
| 53 | } |
||
| 54 | } else { |
||
| 55 | $result[] = join('=', [$model, is_numeric($key) ? $value : $key]); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | $result = array_unique($result); |
||
| 61 | sort($result); |
||
| 62 | return $result; |
||
| 63 | } |
||
| 64 | |||
| 74 | } |