@@ 73-79 (lines=7) @@ | ||
70 | $format->type = 'string'; |
|
71 | } |
|
72 | ||
73 | if ($firstLevel) { |
|
74 | if ($format->type === 'object') { |
|
75 | $format->separator = ':'; |
|
76 | } elseif ($format->type === 'array') { |
|
77 | $format->separator = ','; |
|
78 | } |
|
79 | } |
|
80 | ||
81 | return $format; |
|
82 | } |
|
@@ 107-111 (lines=5) @@ | ||
104 | ||
105 | // Set separator, default to ':' for objects and ',' for arrays in first level |
|
106 | if (in_array($format->type, ['object', 'array'])) { |
|
107 | if (isset($obj->separator)) { |
|
108 | $format->separator = $obj->separator; |
|
109 | } elseif ($firstLevel) { |
|
110 | $format->separator = ($format->type === 'object') ? ':':','; |
|
111 | } |
|
112 | } |
|
113 | ||
114 | // Build format recursively |