| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 54 | public static function encodeArray($array) |
||
| 55 | { |
||
| 56 | if (FileSystem::is_list($array)) { |
||
| 57 | $return = 'l'; |
||
| 58 | foreach ($array as $value) { |
||
| 59 | $return .= self::encode($value); |
||
| 60 | } |
||
| 61 | } else { |
||
| 62 | ksort($array, SORT_STRING); |
||
| 63 | $return = 'd'; |
||
| 64 | foreach ($array as $key => $value) { |
||
| 65 | $return .= self::encode(strval($key)) . self::encode($value); |
||
| 66 | } |
||
| 67 | } |
||
| 68 | return $return . 'e'; |
||
| 69 | } |
||
| 70 | } |