Completed
Pull Request — master (#794)
by Pauline
14:49
created
src/Handler/DateHandler.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                     'type' => $type,
53 53
                     'format' => $format,
54 54
                     'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
55
-                    'method' => 'serialize' . $type,
55
+                    'method' => 'serialize'.$type,
56 56
                 );
57 57
             }
58 58
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     private function isDataXmlNull($data)
116 116
     {
117 117
         $attributes = $data->attributes('xsi', true);
118
-        return isset($attributes['nil'][0]) && (string)$attributes['nil'][0] === 'true';
118
+        return isset($attributes['nil'][0]) && (string) $attributes['nil'][0] === 'true';
119 119
     }
120 120
 
121 121
     public function deserializeDateTimeFromXml(AbstractVisitor $visitor, $data, array $type)
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 
175 175
     private function parseDateTime($data, array $type, $immutable = false)
176 176
     {
177
-        $timezone = !empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone;
177
+        $timezone = ! empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone;
178 178
         $format = $this->getDeserializationFormat($type);
179 179
 
180 180
         if ($immutable) {
181
-            $datetime = \DateTimeImmutable::createFromFormat($format, (string)$data, $timezone);
181
+            $datetime = \DateTimeImmutable::createFromFormat($format, (string) $data, $timezone);
182 182
         } else {
183
-            $datetime = \DateTime::createFromFormat($format, (string)$data, $timezone);
183
+            $datetime = \DateTime::createFromFormat($format, (string) $data, $timezone);
184 184
         }
185 185
 
186 186
         if (false === $datetime) {
@@ -235,15 +235,15 @@  discard block
 block discarded – undo
235 235
         $format = 'P';
236 236
 
237 237
         if (0 < $dateInterval->y) {
238
-            $format .= $dateInterval->y . 'Y';
238
+            $format .= $dateInterval->y.'Y';
239 239
         }
240 240
 
241 241
         if (0 < $dateInterval->m) {
242
-            $format .= $dateInterval->m . 'M';
242
+            $format .= $dateInterval->m.'M';
243 243
         }
244 244
 
245 245
         if (0 < $dateInterval->d) {
246
-            $format .= $dateInterval->d . 'D';
246
+            $format .= $dateInterval->d.'D';
247 247
         }
248 248
 
249 249
         if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) {
@@ -251,15 +251,15 @@  discard block
 block discarded – undo
251 251
         }
252 252
 
253 253
         if (0 < $dateInterval->h) {
254
-            $format .= $dateInterval->h . 'H';
254
+            $format .= $dateInterval->h.'H';
255 255
         }
256 256
 
257 257
         if (0 < $dateInterval->i) {
258
-            $format .= $dateInterval->i . 'M';
258
+            $format .= $dateInterval->i.'M';
259 259
         }
260 260
 
261 261
         if (0 < $dateInterval->s) {
262
-            $format .= $dateInterval->s . 'S';
262
+            $format .= $dateInterval->s.'S';
263 263
         }
264 264
 
265 265
         if ($format === 'P') {
Please login to merge, or discard this patch.