@@ -25,5 +25,7 @@ |
||
25 | 25 | const PRE_DESERIALIZE = 'serializer.pre_deserialize'; |
26 | 26 | const POST_DESERIALIZE = 'serializer.post_deserialize'; |
27 | 27 | |
28 | - final private function __construct() { } |
|
28 | + final private function __construct() |
|
29 | + { |
|
30 | +} |
|
29 | 31 | } |
@@ -72,8 +72,7 @@ discard block |
||
72 | 72 | \DateTimeInterface $date, |
73 | 73 | array $type, |
74 | 74 | Context $context |
75 | - ) |
|
76 | - { |
|
75 | + ) { |
|
77 | 76 | if ($visitor instanceof XmlSerializationVisitor && false === $this->xmlCData) { |
78 | 77 | return $visitor->visitSimpleString($date->format($this->getFormat($type)), $type, $context); |
79 | 78 | } |
@@ -96,8 +95,7 @@ discard block |
||
96 | 95 | \DateTimeImmutable $date, |
97 | 96 | array $type, |
98 | 97 | Context $context |
99 | - ) |
|
100 | - { |
|
98 | + ) { |
|
101 | 99 | return $this->serializeDateTimeInterface($visitor, $date, $type, $context); |
102 | 100 | } |
103 | 101 |
@@ -169,13 +169,13 @@ |
||
169 | 169 | $parentStr |
170 | 170 | ) = $unserialized; |
171 | 171 | |
172 | - if (isset($unserialized['xmlEntryNamespace'])){ |
|
172 | + if (isset($unserialized['xmlEntryNamespace'])) { |
|
173 | 173 | $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace']; |
174 | 174 | } |
175 | - if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){ |
|
175 | + if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) { |
|
176 | 176 | $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty']; |
177 | 177 | } |
178 | - if (isset($unserialized['excludeIf'])){ |
|
178 | + if (isset($unserialized['excludeIf'])) { |
|
179 | 179 | $this->excludeIf = $unserialized['excludeIf']; |
180 | 180 | } |
181 | 181 |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $this->name |
101 | 101 | ) = $unserialized; |
102 | 102 | |
103 | - if (isset($unserialized['excludeIf'])){ |
|
103 | + if (isset($unserialized['excludeIf'])) { |
|
104 | 104 | $this->excludeIf = $unserialized['excludeIf']; |
105 | 105 | } |
106 | 106 | } |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return $doc; |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
88 | 91 | private function emptyStringToSpaceCharacter($data) |
89 | 92 | { |
90 | 93 | return $data === '' ? ' ' : $data; |
@@ -359,7 +362,6 @@ discard block |
||
359 | 362 | /** |
360 | 363 | * Retrieves internalSubset even in bugfixed php versions |
361 | 364 | * |
362 | - * @param \DOMDocumentType $child |
|
363 | 365 | * @param string $data |
364 | 366 | * @return string |
365 | 367 | */ |
@@ -115,10 +115,10 @@ |
||
115 | 115 | $this->name |
116 | 116 | ) = $unserialized; |
117 | 117 | |
118 | - if (isset($unserialized['excludeIf'])){ |
|
118 | + if (isset($unserialized['excludeIf'])) { |
|
119 | 119 | $this->excludeIf = $unserialized['excludeIf']; |
120 | 120 | } |
121 | - if (isset($unserialized['expression'])){ |
|
121 | + if (isset($unserialized['expression'])) { |
|
122 | 122 | $this->expression = $unserialized['expression']; |
123 | 123 | } |
124 | 124 | } |
@@ -82,8 +82,7 @@ |
||
82 | 82 | ObjectConstructorInterface $objectConstructor, |
83 | 83 | EventDispatcherInterface $dispatcher = null, |
84 | 84 | ExpressionEvaluatorInterface $expressionEvaluator = null |
85 | - ) |
|
86 | - { |
|
85 | + ) { |
|
87 | 86 | $this->dispatcher = $dispatcher; |
88 | 87 | $this->metadataFactory = $metadataFactory; |
89 | 88 | $this->handlerRegistry = $handlerRegistry; |
@@ -83,8 +83,7 @@ |
||
83 | 83 | EventDispatcherInterface $dispatcher = null, |
84 | 84 | TypeParser $typeParser = null, |
85 | 85 | ExpressionEvaluatorInterface $expressionEvaluator = null |
86 | - ) |
|
87 | - { |
|
86 | + ) { |
|
88 | 87 | $this->factory = $factory; |
89 | 88 | $this->handlerRegistry = $handlerRegistry; |
90 | 89 | $this->objectConstructor = $objectConstructor; |
@@ -132,6 +132,9 @@ discard block |
||
132 | 132 | return $doCData ? $this->document->createCDATASection($data) : $this->document->createTextNode((string) $data); |
133 | 133 | } |
134 | 134 | |
135 | + /** |
|
136 | + * @param string $data |
|
137 | + */ |
|
135 | 138 | public function visitSimpleString($data, array $type, Context $context) |
136 | 139 | { |
137 | 140 | if (null === $this->document) { |
@@ -478,6 +481,9 @@ discard block |
||
478 | 481 | return $this->document->createElementNS($namespace, $prefix . ':' . $tagName); |
479 | 482 | } |
480 | 483 | |
484 | + /** |
|
485 | + * @param string $value |
|
486 | + */ |
|
481 | 487 | private function setAttributeOnNode(\DOMElement $node, $name, $value, $namespace = null) |
482 | 488 | { |
483 | 489 | if (null !== $namespace) { |