Completed
Pull Request — master (#1108)
by Vincent
15:17
created
src/Handler/DateHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                     'type' => $type,
52 52
                     'format' => $format,
53 53
                     'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION,
54
-                    'method' => 'serialize' . $type,
54
+                    'method' => 'serialize'.$type,
55 55
                 ];
56 56
             }
57 57
         }
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      */
230 230
     private function parseDateTime($data, array $type, bool $immutable = false): \DateTimeInterface
231 231
     {
232
-        $timezone = !empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone;
232
+        $timezone = ! empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone;
233 233
         $formats = $this->getDeserializationFormats($type);
234 234
 
235 235
         $formatTried = [];
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         throw new RuntimeException(sprintf(
255 255
             'Invalid datetime "%s", expected one of the format %s.',
256 256
             $data,
257
-            '"' . implode('", "', $formatTried) . '"'
257
+            '"'.implode('", "', $formatTried).'"'
258 258
         ));
259 259
     }
260 260
 
@@ -300,15 +300,15 @@  discard block
 block discarded – undo
300 300
         $format = 'P';
301 301
 
302 302
         if (0 < $dateInterval->y) {
303
-            $format .= $dateInterval->y . 'Y';
303
+            $format .= $dateInterval->y.'Y';
304 304
         }
305 305
 
306 306
         if (0 < $dateInterval->m) {
307
-            $format .= $dateInterval->m . 'M';
307
+            $format .= $dateInterval->m.'M';
308 308
         }
309 309
 
310 310
         if (0 < $dateInterval->d) {
311
-            $format .= $dateInterval->d . 'D';
311
+            $format .= $dateInterval->d.'D';
312 312
         }
313 313
 
314 314
         if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) {
@@ -316,15 +316,15 @@  discard block
 block discarded – undo
316 316
         }
317 317
 
318 318
         if (0 < $dateInterval->h) {
319
-            $format .= $dateInterval->h . 'H';
319
+            $format .= $dateInterval->h.'H';
320 320
         }
321 321
 
322 322
         if (0 < $dateInterval->i) {
323
-            $format .= $dateInterval->i . 'M';
323
+            $format .= $dateInterval->i.'M';
324 324
         }
325 325
 
326 326
         if (0 < $dateInterval->s) {
327
-            $format .= $dateInterval->s . 'S';
327
+            $format .= $dateInterval->s.'S';
328 328
         }
329 329
 
330 330
         if ('P' === $format) {
Please login to merge, or discard this patch.
src/Type/TypeVisitor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $tokenNode = $element->getChild(0);
38 38
 
39
-        if (!$tokenNode->isToken()) {
39
+        if ( ! $tokenNode->isToken()) {
40 40
             return $tokenNode->accept($this);
41 41
         }
42 42
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             return $value;
66 66
         }
67 67
 
68
-        return str_replace($escapeChar . $escapeChar, $escapeChar, $value);
68
+        return str_replace($escapeChar.$escapeChar, $escapeChar, $value);
69 69
     }
70 70
 
71 71
     private function visitCompoundType(TreeNode $element, ?int &$handle, ?int $eldnah): array
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         return [
77 77
             'name' => $nameToken->getValueValue(),
78 78
             'params' => array_map(
79
-                function (TreeNode $node) use ($handle, $eldnah) {
79
+                function(TreeNode $node) use ($handle, $eldnah) {
80 80
                     return $node->accept($this, $handle, $eldnah);
81 81
                 },
82 82
                 $parameters
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     private function visitArrayType(TreeNode $node, ?int &$handle, ?int $eldnah): array
88 88
     {
89 89
         return array_map(
90
-            function (TreeNode $child) {
90
+            function(TreeNode $child) {
91 91
                 return $child->accept($this);
92 92
             },
93 93
             $node->getChildren()
Please login to merge, or discard this patch.