Passed
Pull Request — master (#927)
by Michael
03:08
created
src/JsonDeserializationVisitor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,32 +53,32 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function visitString($data, array $type): string
55 55
     {
56
-        return (string)$data;
56
+        return (string) $data;
57 57
     }
58 58
 
59 59
     public function visitBoolean($data, array $type): bool
60 60
     {
61
-        return (bool)$data;
61
+        return (bool) $data;
62 62
     }
63 63
 
64 64
     public function visitInteger($data, array $type): int
65 65
     {
66
-        return (int)$data;
66
+        return (int) $data;
67 67
     }
68 68
 
69 69
     public function visitDouble($data, array $type): float
70 70
     {
71
-        return (double)$data;
71
+        return (double) $data;
72 72
     }
73 73
 
74 74
     public function visitArray($data, array $type): array
75 75
     {
76
-        if (!\is_array($data)) {
76
+        if ( ! \is_array($data)) {
77 77
             throw new RuntimeException(sprintf('Expected array, but got %s: %s', \gettype($data), json_encode($data)));
78 78
         }
79 79
 
80 80
         // If no further parameters were given, keys/values are just passed as is.
81
-        if (!$type['params']) {
81
+        if ( ! $type['params']) {
82 82
             return $data;
83 83
         }
84 84
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function visitDiscriminatorMapProperty($data, ClassMetadata $metadata): string
114 114
     {
115 115
         if (isset($data[$metadata->discriminatorFieldName])) {
116
-            return (string)$data[$metadata->discriminatorFieldName];
116
+            return (string) $data[$metadata->discriminatorFieldName];
117 117
         }
118 118
 
119 119
         throw new LogicException(sprintf(
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
             return;
137 137
         }
138 138
 
139
-        if (!\is_array($data)) {
139
+        if ( ! \is_array($data)) {
140 140
             throw new RuntimeException(sprintf('Invalid data "%s"(%s), expected "%s".', $data, $metadata->type['name'], $metadata->reflection->class));
141 141
         }
142 142
 
143
-        if (!array_key_exists($name, $data)) {
143
+        if ( ! array_key_exists($name, $data)) {
144 144
             return;
145 145
         }
146 146
 
147
-        if (!$metadata->type) {
147
+        if ( ! $metadata->type) {
148 148
             throw new RuntimeException(sprintf('You must define a type for %s::$%s.', $metadata->reflection->class, $metadata->name));
149 149
         }
150 150
 
Please login to merge, or discard this patch.
src/SerializationGraphNavigator.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
         AccessorStrategyInterface $accessor,
69 69
         EventDispatcherInterface $dispatcher = null,
70 70
         ExpressionEvaluatorInterface $expressionEvaluator = null
71
-    )
72
-    {
71
+    ) {
73 72
         $this->dispatcher = $dispatcher ?: new EventDispatcher();
74 73
         $this->metadataFactory = $metadataFactory;
75 74
         $this->handlerRegistry = $handlerRegistry;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -130,33 +130,33 @@
 block discarded – undo
130 130
 
131 131
         switch ($type['name']) {
132 132
             case 'NULL':
133
-                if (!$this->shouldSerializeNull) {
133
+                if ( ! $this->shouldSerializeNull) {
134 134
                     throw new NotAcceptableException();
135 135
                 }
136 136
                 return $this->visitor->visitNull($data, $type);
137 137
 
138 138
             case 'string':
139
-                return $this->visitor->visitString((string)$data, $type);
139
+                return $this->visitor->visitString((string) $data, $type);
140 140
 
141 141
             case 'int':
142 142
             case 'integer':
143
-                return $this->visitor->visitInteger((int)$data, $type);
143
+                return $this->visitor->visitInteger((int) $data, $type);
144 144
 
145 145
             case 'bool':
146 146
             case 'boolean':
147
-                return $this->visitor->visitBoolean((bool)$data, $type);
147
+                return $this->visitor->visitBoolean((bool) $data, $type);
148 148
 
149 149
             case 'double':
150 150
             case 'float':
151
-                return $this->visitor->visitDouble((float)$data, $type);
151
+                return $this->visitor->visitDouble((float) $data, $type);
152 152
 
153 153
             case 'array':
154
-                return $this->visitor->visitArray((array)$data, $type);
154
+                return $this->visitor->visitArray((array) $data, $type);
155 155
 
156 156
             case 'resource':
157 157
                 $msg = 'Resources are not supported in serialized data.';
158 158
                 if (null !== $path = $this->context->getPath()) {
159
-                    $msg .= ' Path: ' . $path;
159
+                    $msg .= ' Path: '.$path;
160 160
                 }
161 161
 
162 162
                 throw new RuntimeException($msg);
Please login to merge, or discard this patch.
src/EventDispatcher/LazyEventDispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function __construct($container)
32 32
     {
33
-        if (!$container instanceof PsrContainerInterface && !$container instanceof ContainerInterface) {
33
+        if ( ! $container instanceof PsrContainerInterface && ! $container instanceof ContainerInterface) {
34 34
             throw new InvalidArgumentException(sprintf('The container must be an instance of %s or %s (%s given).', PsrContainerInterface::class, ContainerInterface::class, \is_object($container) ? \get_class($container) : \gettype($container)));
35 35
         }
36 36
 
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
         $listeners = parent::initializeListeners($eventName, $loweredClass, $format);
46 46
 
47 47
         foreach ($listeners as &$listener) {
48
-            if (!\is_array($listener[0]) || !\is_string($listener[0][0])) {
48
+            if ( ! \is_array($listener[0]) || ! \is_string($listener[0][0])) {
49 49
                 continue;
50 50
             }
51 51
 
52
-            if (!$this->container->has($listener[0][0])) {
52
+            if ( ! $this->container->has($listener[0][0])) {
53 53
                 continue;
54 54
             }
55 55
 
Please login to merge, or discard this patch.
src/XmlSerializationVisitor.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function createRoot(ClassMetadata $metadata = null, $rootName = null, $rootNamespace = null)
80 80
     {
81
-        if ($metadata !== null && !empty($metadata->xmlRootName)) {
81
+        if ($metadata !== null && ! empty($metadata->xmlRootName)) {
82 82
             $rootName = $metadata->xmlRootName;
83 83
             $rootNamespace = $metadata->xmlRootNamespace ?: $this->getClassDefaultNamespace($metadata);
84 84
         } else {
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $doCData = null !== $this->currentMetadata ? $this->currentMetadata->xmlElementCData : true;
113 113
 
114
-        return $doCData ? $this->document->createCDATASection($data) : $this->document->createTextNode((string)$data);
114
+        return $doCData ? $this->document->createCDATASection($data) : $this->document->createTextNode((string) $data);
115 115
     }
116 116
 
117 117
     public function visitSimpleString($data, array $type)
118 118
     {
119
-        return $this->document->createTextNode((string)$data);
119
+        return $this->document->createTextNode((string) $data);
120 120
     }
121 121
 
122 122
     public function visitBoolean(bool $data, array $type)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     public function visitInteger(int $data, array $type)
128 128
     {
129
-        return $this->document->createTextNode((string)$data);
129
+        return $this->document->createTextNode((string) $data);
130 130
     }
131 131
 
132 132
     public function visitDouble(float $data, array $type)
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         if (floor($data) === $data) {
135 135
             return $this->document->createTextNode($data.".0");
136 136
         } else {
137
-            return $this->document->createTextNode((string)$data);
137
+            return $this->document->createTextNode((string) $data);
138 138
         }
139 139
     }
140 140
 
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
         $elType = $this->getElementType($type);
152 152
         foreach ($data as $k => $v) {
153 153
 
154
-            $tagName = (null !== $this->currentMetadata && $this->currentMetadata->xmlKeyValuePairs && $this->isElementNameValid((string)$k)) ? $k : $entryName;
154
+            $tagName = (null !== $this->currentMetadata && $this->currentMetadata->xmlKeyValuePairs && $this->isElementNameValid((string) $k)) ? $k : $entryName;
155 155
 
156 156
             $entryNode = $this->createElement($tagName, $namespace);
157 157
             $this->currentNode->appendChild($entryNode);
158 158
             $this->setCurrentNode($entryNode);
159 159
 
160 160
             if (null !== $keyAttributeName) {
161
-                $entryNode->setAttribute($keyAttributeName, (string)$k);
161
+                $entryNode->setAttribute($keyAttributeName, (string) $k);
162 162
             }
163 163
 
164 164
             try {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             $node = $this->navigator->accept($v, $metadata->type);
194 194
             $this->revertCurrentMetadata();
195 195
 
196
-            if (!$node instanceof \DOMCharacterData) {
196
+            if ( ! $node instanceof \DOMCharacterData) {
197 197
                 throw new RuntimeException(sprintf('Unsupported value for XML attribute for %s. Expected character data, but got %s.', $metadata->name, json_encode($v)));
198 198
             }
199 199
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         }
204 204
 
205 205
         if (($metadata->xmlValue && $this->currentNode->childNodes->length > 0)
206
-            || (!$metadata->xmlValue && $this->hasValue)
206
+            || ( ! $metadata->xmlValue && $this->hasValue)
207 207
         ) {
208 208
             throw new RuntimeException(sprintf('If you make use of @XmlValue, all other properties in the class must have the @XmlAttribute annotation. Invalid usage detected in class %s.', $metadata->class));
209 209
         }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $node = $this->navigator->accept($v, $metadata->type);
216 216
             $this->revertCurrentMetadata();
217 217
 
218
-            if (!$node instanceof \DOMCharacterData) {
218
+            if ( ! $node instanceof \DOMCharacterData) {
219 219
                 throw new RuntimeException(sprintf('Unsupported value for property %s::$%s. Expected character data, but got %s.', $metadata->reflection->class, $metadata->reflection->name, \is_object($node) ? \get_class($node) : \gettype($node)));
220 220
             }
221 221
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         }
226 226
 
227 227
         if ($metadata->xmlAttributeMap) {
228
-            if (!\is_array($v)) {
228
+            if ( ! \is_array($v)) {
229 229
                 throw new RuntimeException(sprintf('Unsupported value type for XML attribute map. Expected array but got %s.', \gettype($v)));
230 230
             }
231 231
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                 $node = $this->navigator->accept($value, null);
235 235
                 $this->revertCurrentMetadata();
236 236
 
237
-                if (!$node instanceof \DOMCharacterData) {
237
+                if ( ! $node instanceof \DOMCharacterData) {
238 238
                     throw new RuntimeException(sprintf('Unsupported value for a XML attribute map value. Expected character data, but got %s.', json_encode($v)));
239 239
                 }
240 240
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             return;
245 245
         }
246 246
 
247
-        if ($addEnclosingElement = !$this->isInLineCollection($metadata) && !$metadata->inline) {
247
+        if ($addEnclosingElement = ! $this->isInLineCollection($metadata) && ! $metadata->inline) {
248 248
 
249 249
             $namespace = null !== $metadata->xmlNamespace
250 250
                 ? $metadata->xmlNamespace
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
     private function isSkippableEmptyObject($node, PropertyMetadata $metadata)
296 296
     {
297
-        return $node === null && !$metadata->xmlCollection && $metadata->skipWhenEmpty;
297
+        return $node === null && ! $metadata->xmlCollection && $metadata->skipWhenEmpty;
298 298
     }
299 299
 
300 300
     private function isSkippableCollection(PropertyMetadata $metadata)
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 
305 305
     private function isElementEmpty(\DOMElement $element)
306 306
     {
307
-        return !$element->hasChildNodes() && !$element->hasAttributes();
307
+        return ! $element->hasChildNodes() && ! $element->hasAttributes();
308 308
     }
309 309
 
310 310
     public function endVisitingObject(ClassMetadata $metadata, object $data, array $type)
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         foreach ($metadata->xmlNamespaces as $prefix => $uri) {
412 412
             $attribute = 'xmlns';
413 413
             if ($prefix !== '') {
414
-                $attribute .= ':' . $prefix;
414
+                $attribute .= ':'.$prefix;
415 415
             } elseif ($element->namespaceURI === $uri) {
416 416
                 continue;
417 417
             }
@@ -427,19 +427,19 @@  discard block
 block discarded – undo
427 427
         if ($this->currentNode->isDefaultNamespace($namespace)) {
428 428
             return $this->document->createElementNS($namespace, $tagName);
429 429
         }
430
-        if (!($prefix = $this->currentNode->lookupPrefix($namespace)) && !($prefix = $this->document->lookupPrefix($namespace))) {
431
-            $prefix = 'ns-' . substr(sha1($namespace), 0, 8);
430
+        if ( ! ($prefix = $this->currentNode->lookupPrefix($namespace)) && ! ($prefix = $this->document->lookupPrefix($namespace))) {
431
+            $prefix = 'ns-'.substr(sha1($namespace), 0, 8);
432 432
         }
433
-        return $this->document->createElementNS($namespace, $prefix . ':' . $tagName);
433
+        return $this->document->createElementNS($namespace, $prefix.':'.$tagName);
434 434
     }
435 435
 
436 436
     private function setAttributeOnNode(\DOMElement $node, $name, $value, $namespace = null)
437 437
     {
438 438
         if (null !== $namespace) {
439
-            if (!$prefix = $node->lookupPrefix($namespace)) {
440
-                $prefix = 'ns-' . substr(sha1($namespace), 0, 8);
439
+            if ( ! $prefix = $node->lookupPrefix($namespace)) {
440
+                $prefix = 'ns-'.substr(sha1($namespace), 0, 8);
441 441
             }
442
-            $node->setAttributeNS($namespace, $prefix . ':' . $name, $value);
442
+            $node->setAttributeNS($namespace, $prefix.':'.$name, $value);
443 443
         } else {
444 444
             $node->setAttribute($name, $value);
445 445
         }
Please login to merge, or discard this patch.
src/DeserializationGraphNavigator.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -153,11 +153,11 @@  discard block
 block discarded – undo
153 153
                 /** @var $metadata ClassMetadata */
154 154
                 $metadata = $this->metadataFactory->getMetadataForClass($type['name']);
155 155
 
156
-                if ($metadata->usingExpression && !$this->expressionExclusionStrategy) {
156
+                if ($metadata->usingExpression && ! $this->expressionExclusionStrategy) {
157 157
                     throw new ExpressionLanguageRequiredException("To use conditional exclude/expose in {$metadata->name} you must configure the expression language.");
158 158
                 }
159 159
 
160
-                if (!empty($metadata->discriminatorMap) && $type['name'] === $metadata->discriminatorBaseClass) {
160
+                if ( ! empty($metadata->discriminatorMap) && $type['name'] === $metadata->discriminatorBaseClass) {
161 161
                     $metadata = $this->resolveMetadata($data, $metadata);
162 162
                 }
163 163
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                     try {
190 190
                         $v = $this->visitor->visitProperty($propertyMetadata, $data);
191 191
                         $this->accessor->setValue($object, $v, $propertyMetadata);
192
-                    }catch (NotAcceptableException $e){
192
+                    } catch (NotAcceptableException $e) {
193 193
 
194 194
                     }
195 195
                     $this->context->popPropertyMetadata();
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     {
207 207
         $typeValue = $this->visitor->visitDiscriminatorMapProperty($data, $metadata);
208 208
 
209
-        if (!isset($metadata->discriminatorMap[$typeValue])) {
209
+        if ( ! isset($metadata->discriminatorMap[$typeValue])) {
210 210
             throw new LogicException(sprintf(
211 211
                 'The type value "%s" does not exist in the discriminator map of class "%s". Available types: %s',
212 212
                 $typeValue,
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
                     try {
190 190
                         $v = $this->visitor->visitProperty($propertyMetadata, $data);
191 191
                         $this->accessor->setValue($object, $v, $propertyMetadata);
192
-                    }catch (NotAcceptableException $e){
192
+                    } catch (NotAcceptableException $e) {
193 193
 
194 194
                     }
195 195
                     $this->context->popPropertyMetadata();
Please login to merge, or discard this patch.
src/TypeParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             /x',
53 53
             [self::T_NAME => 'T_NAME', self::T_STRING => 'T_STRING', self::T_OPEN_BRACKET => 'T_OPEN_BRACKET',
54 54
                 self::T_CLOSE_BRACKET => 'T_CLOSE_BRACKET', self::T_COMMA => 'T_COMMA', self::T_NONE => 'T_NONE'],
55
-            function ($value) {
55
+            function($value) {
56 56
                 switch ($value[0]) {
57 57
                     case '"':
58 58
                     case "'":
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function parseInternal()
85 85
     {
86 86
         $typeName = $this->match(self::T_NAME);
87
-        if (!$this->lexer->isNext(self::T_OPEN_BRACKET)) {
87
+        if ( ! $this->lexer->isNext(self::T_OPEN_BRACKET)) {
88 88
             return ['name' => $typeName, 'params' => []];
89 89
         }
90 90
 
Please login to merge, or discard this patch.
src/JsonSerializationVisitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $rs = isset($type['params'][1]) ? new \ArrayObject() : [];
79 79
 
80
-        $isList = isset($type['params'][0]) && !isset($type['params'][1]);
80
+        $isList = isset($type['params'][0]) && ! isset($type['params'][1]);
81 81
 
82 82
         $elType = $this->getElementType($type);
83 83
         foreach ($data as $k => $v) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         if ($metadata->inline) {
134 134
             if (\is_array($v) || ($v instanceof \ArrayObject)) {
135
-                $this->data = array_merge($this->data, (array)$v);
135
+                $this->data = array_merge($this->data, (array) $v);
136 136
             }
137 137
         } else {
138 138
             $this->data[$metadata->serializedName] = $v;
Please login to merge, or discard this patch.
src/Builder/DefaultDriverFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function createDriver(array $metadataDirs, Reader $annotationReader)
32 32
     {
33
-        if (!empty($metadataDirs)) {
33
+        if ( ! empty($metadataDirs)) {
34 34
             $fileLocator = new FileLocator($metadataDirs);
35 35
 
36 36
             return new DriverChain([
Please login to merge, or discard this patch.
src/Metadata/ClassMetadata.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function setAccessorOrder($order, array $customOrder = [])
95 95
     {
96
-        if (!in_array($order, [self::ACCESSOR_ORDER_UNDEFINED, self::ACCESSOR_ORDER_ALPHABETICAL, self::ACCESSOR_ORDER_CUSTOM], true)) {
96
+        if ( ! in_array($order, [self::ACCESSOR_ORDER_UNDEFINED, self::ACCESSOR_ORDER_ALPHABETICAL, self::ACCESSOR_ORDER_CUSTOM], true)) {
97 97
             throw new InvalidArgumentException(sprintf('The accessor order "%s" is invalid.', $order));
98 98
         }
99 99
 
100 100
         foreach ($customOrder as $name) {
101
-            if (!\is_string($name)) {
101
+            if ( ! \is_string($name)) {
102 102
                 throw new InvalidArgumentException(sprintf('$customOrder is expected to be a list of strings, but got element of value %s.', json_encode($name)));
103 103
             }
104 104
         }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
     public function merge(MergeableInterface $object)
136 136
     {
137
-        if (!$object instanceof ClassMetadata) {
137
+        if ( ! $object instanceof ClassMetadata) {
138 138
             throw new InvalidArgumentException('$object must be an instance of ClassMetadata.');
139 139
         }
140 140
         parent::merge($object);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 $this->discriminatorBaseClass,
159 159
                 $this->discriminatorBaseClass
160 160
             ));
161
-        } elseif (!$this->discriminatorFieldName && $object->discriminatorFieldName) {
161
+        } elseif ( ! $this->discriminatorFieldName && $object->discriminatorFieldName) {
162 162
             $this->discriminatorFieldName = $object->discriminatorFieldName;
163 163
             $this->discriminatorMap = $object->discriminatorMap;
164 164
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             $this->discriminatorBaseClass = $object->discriminatorBaseClass;
174 174
         }
175 175
 
176
-        if ($this->discriminatorMap && !$this->reflection->isAbstract()) {
176
+        if ($this->discriminatorMap && ! $this->reflection->isAbstract()) {
177 177
             if (false === $typeValue = array_search($this->name, $this->discriminatorMap, true)) {
178 178
                 throw new LogicException(sprintf(
179 179
                     'The sub-class "%s" is not listed in the discriminator of the base class "%s".',
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             $this->discriminatorValue = $typeValue;
186 186
 
187 187
             if (isset($this->propertyMetadata[$this->discriminatorFieldName])
188
-                && !$this->propertyMetadata[$this->discriminatorFieldName] instanceof StaticPropertyMetadata
188
+                && ! $this->propertyMetadata[$this->discriminatorFieldName] instanceof StaticPropertyMetadata
189 189
             ) {
190 190
                 throw new LogicException(sprintf(
191 191
                     'The discriminator field name "%s" of the base-class "%s" conflicts with a regular property of the sub-class "%s".',
@@ -213,12 +213,12 @@  discard block
 block discarded – undo
213 213
 
214 214
     public function registerNamespace($uri, $prefix = null)
215 215
     {
216
-        if (!\is_string($uri)) {
216
+        if ( ! \is_string($uri)) {
217 217
             throw new InvalidArgumentException(sprintf('$uri is expected to be a strings, but got value %s.', json_encode($uri)));
218 218
         }
219 219
 
220 220
         if ($prefix !== null) {
221
-            if (!\is_string($prefix)) {
221
+            if ( ! \is_string($prefix)) {
222 222
                 throw new InvalidArgumentException(sprintf('$prefix is expected to be a strings, but got value %s.', json_encode($prefix)));
223 223
             }
224 224
         } else {
@@ -311,19 +311,19 @@  discard block
 block discarded – undo
311 311
             case self::ACCESSOR_ORDER_CUSTOM:
312 312
                 $order = $this->customOrder;
313 313
                 $currentSorting = $this->propertyMetadata ? array_combine(array_keys($this->propertyMetadata), range(1, \count($this->propertyMetadata))) : [];
314
-                uksort($this->propertyMetadata, function ($a, $b) use ($order, $currentSorting) {
314
+                uksort($this->propertyMetadata, function($a, $b) use ($order, $currentSorting) {
315 315
                     $existsA = isset($order[$a]);
316 316
                     $existsB = isset($order[$b]);
317 317
 
318
-                    if (!$existsA && !$existsB) {
318
+                    if ( ! $existsA && ! $existsB) {
319 319
                         return $currentSorting[$a] - $currentSorting[$b];
320 320
                     }
321 321
 
322
-                    if (!$existsA) {
322
+                    if ( ! $existsA) {
323 323
                         return 1;
324 324
                     }
325 325
 
326
-                    if (!$existsB) {
326
+                    if ( ! $existsB) {
327 327
                         return -1;
328 328
                     }
329 329
 
Please login to merge, or discard this patch.