@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | static protected function registerAnnotations() |
| 49 | 49 | { |
| 50 | 50 | if (self::$annotationsRegistered === false) { |
| 51 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Relationship.php'); |
|
| 52 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); |
|
| 53 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Link.php'); |
|
| 51 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/Relationship.php'); |
|
| 52 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/Attribute.php'); |
|
| 53 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/Link.php'); |
|
| 54 | 54 | |
| 55 | 55 | self::$annotationsRegistered = true; |
| 56 | 56 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function getDefinition(string $class): Definition |
| 82 | 82 | { |
| 83 | - if (! isset($this->definitionCache[$class])) { |
|
| 83 | + if (!isset($this->definitionCache[$class])) { |
|
| 84 | 84 | $reflection = new \ReflectionClass($class); |
| 85 | 85 | |
| 86 | 86 | $this->definitionCache[$class] = $this->createDefinition($reflection); |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | protected function validateMethodAttribute(AttributeAnnotation $annotation, \ReflectionMethod $method) |
| 204 | 204 | { |
| 205 | - if (! $method->isPublic()) { |
|
| 205 | + if (!$method->isPublic()) { |
|
| 206 | 206 | throw new \LogicException(sprintf( |
| 207 | 207 | 'Attribute annotation can be applied only to non public method "%s".', |
| 208 | 208 | $method->getName() |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | protected function processDataType(string $definition, Attribute $attribute) |
| 339 | 339 | { |
| 340 | - if (! preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 340 | + if (!preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 341 | 341 | throw new \LogicException(sprintf('Data-type definition "%s" is invalid.', $definition)); |
| 342 | 342 | } |
| 343 | 343 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | foreach (['get', 'is'] as $prefix) |
| 396 | 396 | { |
| 397 | - $getter = $prefix . ucfirst($name); |
|
| 397 | + $getter = $prefix.ucfirst($name); |
|
| 398 | 398 | |
| 399 | 399 | if ($class->hasMethod($getter) && $class->getMethod($getter)->isPublic()) { |
| 400 | 400 | return $getter; |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | throw new \LogicException(sprintf( |
| 405 | - 'Getter-method for the property "%s" cannot be resolved automatically. ' . |
|
| 405 | + 'Getter-method for the property "%s" cannot be resolved automatically. '. |
|
| 406 | 406 | 'Probably there is no get%2$s() or is%2$s() method or it is not public.', |
| 407 | 407 | $name, ucfirst($name) |
| 408 | 408 | )); |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | $name = $property->getName(); |
| 420 | 420 | $class = $property->getDeclaringClass(); |
| 421 | 421 | |
| 422 | - $setter = 'set' . ucfirst($name); |
|
| 422 | + $setter = 'set'.ucfirst($name); |
|
| 423 | 423 | |
| 424 | 424 | if ($class->hasMethod($setter) && $class->getMethod($setter)->isPublic()) { |
| 425 | 425 | return $setter; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | */ |
| 451 | 451 | protected function createLink(LinkAnnotation $annotation): Link |
| 452 | 452 | { |
| 453 | - if (! preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 453 | + if (!preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 454 | 454 | throw new \LogicException(sprintf('Invalid resource definition: "%s"', $annotation->resource)); |
| 455 | 455 | } |
| 456 | 456 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | foreach ($definitions as $definition) |
| 159 | 159 | { |
| 160 | - if (! $definition->hasSetter()) { |
|
| 160 | + if (!$definition->hasSetter()) { |
|
| 161 | 161 | continue; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | $name = $definition->getName(); |
| 178 | 178 | |
| 179 | - if (! $resource->hasAttribute($name)) { |
|
| 179 | + if (!$resource->hasAttribute($name)) { |
|
| 180 | 180 | return; |
| 181 | 181 | } |
| 182 | 182 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - if (! $value instanceof \DateTimeInterface) { |
|
| 24 | + if (!$value instanceof \DateTimeInterface) { |
|
| 25 | 25 | $value = new \DateTimeImmutable((string) $value); |
| 26 | 26 | } |
| 27 | 27 | |