| @@ 202-211 (lines=10) @@ | ||
| 199 | */ |
|
| 200 | private function writeCore($text, $quotes) |
|
| 201 | { |
|
| 202 | if (0 != count($this->scopes)) { |
|
| 203 | $currentScope = end($this->scopes); |
|
| 204 | if ($currentScope->type == $this->scopeType['Array']) { |
|
| 205 | if (0 != $currentScope->objectCount) { |
|
| 206 | $this->writer->writeTrimmed(', '); |
|
| 207 | } |
|
| 208 | ||
| 209 | ++$currentScope->objectCount; |
|
| 210 | } |
|
| 211 | } |
|
| 212 | ||
| 213 | if ($quotes && 'null' !== $text) { |
|
| 214 | $this->writer->writeValue('"'); |
|
| @@ 230-239 (lines=10) @@ | ||
| 227 | */ |
|
| 228 | private function startScope($type) |
|
| 229 | { |
|
| 230 | if (0 != count($this->scopes)) { |
|
| 231 | $currentScope = end($this->scopes); |
|
| 232 | if (($currentScope->type == $this->scopeType['Array']) && (0 != $currentScope->objectCount)) { |
|
| 233 | $this->writer->writeTrimmed(', '); |
|
| 234 | } |
|
| 235 | ||
| 236 | ++$currentScope->objectCount; |
|
| 237 | } |
|
| 238 | ||
| 239 | $scope = new Scope($type); |
|
| 240 | array_push($this->scopes, $scope); |
|
| 241 | ||
| 242 | if ($type == $this->scopeType['Array']) { |
|