Completed
Pull Request — master (#745)
by Joseph
04:46
created
src/JMS/Serializer/XmlDeserializationVisitor.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         if (false !== stripos($data, '<!doctype')) {
69 69
             $internalSubset = $this->getDomDocumentTypeEntitySubset($data);
70
-            if (!in_array($internalSubset, $this->doctypeWhitelist, true)) {
70
+            if ( ! in_array($internalSubset, $this->doctypeWhitelist, true)) {
71 71
                 throw new InvalidArgumentException(sprintf(
72 72
                     'The document type "%s" is not allowed. If it is safe, you may add it to the whitelist configuration.',
73 73
                     $internalSubset
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
         if ($namespace === null && $this->objectMetadataStack->count()) {
158 158
             $classMetadata = $this->objectMetadataStack->top();
159
-            $namespace = isset($classMetadata->xmlNamespaces[''])?$classMetadata->xmlNamespaces['']:$namespace;
159
+            $namespace = isset($classMetadata->xmlNamespaces['']) ? $classMetadata->xmlNamespaces[''] : $namespace;
160 160
         }
161 161
 
162 162
         if (null !== $namespace) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             $nodes = $data->xpath($entryName);
168 168
         }
169 169
 
170
-        if (!count($nodes)) {
170
+        if ( ! count($nodes)) {
171 171
             if (null === $this->result) {
172 172
                 return $this->result = array();
173 173
             }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
         if ($metadata->xmlCollection) {
260 260
             $enclosingElem = $data;
261
-            if (!$metadata->xmlCollectionInline) {
261
+            if ( ! $metadata->xmlCollectionInline) {
262 262
                 $enclosingElem = $data->children($metadata->xmlNamespace)->$name;
263 263
             }
264 264
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         if ($metadata->xmlNamespace) {
274 274
             $node = $data->children($metadata->xmlNamespace)->$name;
275
-            if (!$node->count()) {
275
+            if ( ! $node->count()) {
276 276
                 return;
277 277
             }
278 278
         } else {
@@ -282,9 +282,9 @@  discard block
 block discarded – undo
282 282
             if (isset($namespaces[''])) {
283 283
                 $prefix = uniqid('ns-');
284 284
                 $data->registerXPathNamespace($prefix, $namespaces['']);
285
-                $nodes = $data->xpath('./'.$prefix. ':'.$name );
285
+                $nodes = $data->xpath('./'.$prefix.':'.$name);
286 286
             } else {
287
-                $nodes = $data->xpath('./'. $name );
287
+                $nodes = $data->xpath('./'.$name);
288 288
             }
289 289
             if (empty($nodes)) {
290 290
                 return;
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      */
369 369
     private function getDomDocumentTypeEntitySubset($data)
370 370
     {
371
-        if (!is_string($data)) {
371
+        if ( ! is_string($data)) {
372 372
             $data = (string) $data;
373 373
         }
374 374
 
Please login to merge, or discard this patch.