@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $this->addExclusionStrategy(new VersionExclusionStrategy($this->attributes['version'])); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if (!empty($this->attributes['max_depth_checks'])) { |
|
| 82 | + if ( ! empty($this->attributes['max_depth_checks'])) { |
|
| 83 | 83 | $this->addExclusionStrategy(new DepthExclusionStrategy()); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | final protected function assertMutable(): void |
| 134 | 134 | { |
| 135 | - if (!$this->initialized) { |
|
| 135 | + if ( ! $this->initialized) { |
|
| 136 | 136 | return; |
| 137 | 137 | } |
| 138 | 138 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | { |
| 209 | 209 | $metadata = $this->metadataStack->pop(); |
| 210 | 210 | |
| 211 | - if (!$metadata instanceof PropertyMetadata) { |
|
| 211 | + if ( ! $metadata instanceof PropertyMetadata) { |
|
| 212 | 212 | throw new RuntimeException('Context metadataStack not working well'); |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | { |
| 218 | 218 | $metadata = $this->metadataStack->pop(); |
| 219 | 219 | |
| 220 | - if (!$metadata instanceof ClassMetadata) { |
|
| 220 | + if ( ! $metadata instanceof ClassMetadata) { |
|
| 221 | 221 | throw new RuntimeException('Context metadataStack not working well'); |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | */ |
| 233 | 233 | public function getCurrentPath(): array |
| 234 | 234 | { |
| 235 | - if (!$this->metadataStack) { |
|
| 235 | + if ( ! $this->metadataStack) { |
|
| 236 | 236 | return []; |
| 237 | 237 | } |
| 238 | 238 | |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function createDriver(array $metadataDirs, Reader $annotationReader): DriverInterface |
| 45 | 45 | { |
| 46 | - if (!empty($metadataDirs)) { |
|
| 46 | + if ( ! empty($metadataDirs)) { |
|
| 47 | 47 | $fileLocator = new FileLocator($metadataDirs); |
| 48 | 48 | |
| 49 | 49 | $driver = new DriverChain([ |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | 'type' => $type, |
| 48 | 48 | 'format' => $format, |
| 49 | 49 | 'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION, |
| 50 | - 'method' => 'serialize' . $type, |
|
| 50 | + 'method' => 'serialize'.$type, |
|
| 51 | 51 | ]; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | 'type' => 'DateTimeInterface', |
| 56 | 56 | 'direction' => GraphNavigatorInterface::DIRECTION_DESERIALIZATION, |
| 57 | 57 | 'format' => $format, |
| 58 | - 'method' => 'deserializeDateTimeFrom' . ucfirst($format), |
|
| 58 | + 'method' => 'deserializeDateTimeFrom'.ucfirst($format), |
|
| 59 | 59 | ]; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | private function parseDateTime($data, array $type, bool $immutable = false): \DateTimeInterface |
| 225 | 225 | { |
| 226 | - $timezone = !empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone; |
|
| 226 | + $timezone = ! empty($type['params'][1]) ? new \DateTimeZone($type['params'][1]) : $this->defaultTimezone; |
|
| 227 | 227 | $formats = $this->getDeserializationFormats($type); |
| 228 | 228 | |
| 229 | 229 | $formatTried = []; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | throw new RuntimeException(sprintf( |
| 249 | 249 | 'Invalid datetime "%s", expected one of the format %s.', |
| 250 | 250 | $data, |
| 251 | - '"' . implode('", "', $formatTried) . '"' |
|
| 251 | + '"'.implode('", "', $formatTried).'"' |
|
| 252 | 252 | )); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -289,15 +289,15 @@ discard block |
||
| 289 | 289 | $format = 'P'; |
| 290 | 290 | |
| 291 | 291 | if (0 < $dateInterval->y) { |
| 292 | - $format .= $dateInterval->y . 'Y'; |
|
| 292 | + $format .= $dateInterval->y.'Y'; |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | if (0 < $dateInterval->m) { |
| 296 | - $format .= $dateInterval->m . 'M'; |
|
| 296 | + $format .= $dateInterval->m.'M'; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if (0 < $dateInterval->d) { |
| 300 | - $format .= $dateInterval->d . 'D'; |
|
| 300 | + $format .= $dateInterval->d.'D'; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) { |
@@ -305,15 +305,15 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | if (0 < $dateInterval->h) { |
| 308 | - $format .= $dateInterval->h . 'H'; |
|
| 308 | + $format .= $dateInterval->h.'H'; |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | if (0 < $dateInterval->i) { |
| 312 | - $format .= $dateInterval->i . 'M'; |
|
| 312 | + $format .= $dateInterval->i.'M'; |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | if (0 < $dateInterval->s) { |
| 316 | - $format .= $dateInterval->s . 'S'; |
|
| 316 | + $format .= $dateInterval->s.'S'; |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | if ('P' === $format) { |