@@ 143-152 (lines=10) @@ | ||
140 | * |
|
141 | * @return \DOMNode |
|
142 | */ |
|
143 | private function createBooleanNode(\DOMDocument $document, bool $value, string $name = null): \DOMNode |
|
144 | { |
|
145 | $node = $document->createElement('json:boolean', $value ? 'true' : 'false'); |
|
146 | ||
147 | if (null !== $name) { |
|
148 | $node->setAttribute('name', $name); |
|
149 | } |
|
150 | ||
151 | return $node; |
|
152 | } |
|
153 | ||
154 | /** |
|
155 | * @param \DOMDocument $document |
|
@@ 179-188 (lines=10) @@ | ||
176 | * |
|
177 | * @return \DOMNode |
|
178 | */ |
|
179 | private function createNumberNode(\DOMDocument $document, $value, string $name = null): \DOMNode |
|
180 | { |
|
181 | $node = $document->createElement('json:number', (string) $value); |
|
182 | ||
183 | if (null !== $name) { |
|
184 | $node->setAttribute('name', $name); |
|
185 | } |
|
186 | ||
187 | return $node; |
|
188 | } |
|
189 | ||
190 | /** |
|
191 | * @param \DOMDocument $document |