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