@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | protected function createRelationship($object, RelationshipDefinition $definition, MappingContext $context): AbstractRelationship |
| 73 | 73 | { |
| 74 | - if (! $definition->isDataIncluded()) { |
|
| 74 | + if (!$definition->isDataIncluded()) { |
|
| 75 | 75 | return new NoDataRelationship(); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -250,7 +250,7 @@ |
||
| 250 | 250 | */ |
| 251 | 251 | public function __toString(): string |
| 252 | 252 | { |
| 253 | - return 'Error-object with ' . ( |
|
| 253 | + return 'Error-object with '.( |
|
| 254 | 254 | $this->id === null |
| 255 | 255 | ? 'no ID' |
| 256 | 256 | : sprintf('ID: "%s"', $this->id) |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | foreach ($definition->getParameters() as $name => $value) |
| 116 | 116 | { |
| 117 | - if (! preg_match('~@(?:(?<namespace>[a-z0-9_\.]+)\:)?(?<name>[a-z0-9_\.]+)~i', $value, $matches)) { |
|
| 117 | + if (!preg_match('~@(?:(?<namespace>[a-z0-9_\.]+)\:)?(?<name>[a-z0-9_\.]+)~i', $value, $matches)) { |
|
| 118 | 118 | $resolved[$name] = $value; |
| 119 | 119 | continue; |
| 120 | 120 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | continue; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - if (! isset($scope[$matches['namespace']])) { |
|
| 127 | + if (!isset($scope[$matches['namespace']])) { |
|
| 128 | 128 | throw new \LogicException(sprintf('Object "%s" not found in the scope.', $matches['namespace'])); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | static protected function registerAnnotations() |
| 43 | 43 | { |
| 44 | 44 | if (self::$annotationsRegistered === false) { |
| 45 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Relationship.php'); |
|
| 46 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Link.php'); |
|
| 45 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/Relationship.php'); |
|
| 46 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/Link.php'); |
|
| 47 | 47 | |
| 48 | 48 | self::$annotationsRegistered = true; |
| 49 | 49 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function getDefinition(string $class): Definition |
| 75 | 75 | { |
| 76 | - if (! isset($this->definitionCache[$class])) { |
|
| 76 | + if (!isset($this->definitionCache[$class])) { |
|
| 77 | 77 | $reflection = new \ReflectionClass($class); |
| 78 | 78 | |
| 79 | 79 | $this->definitionCache[$class] = $this->createDefinition($reflection); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | { |
| 201 | 201 | if ($annotation->getter === null) { |
| 202 | 202 | $name = $relationship->getPropertyName(); |
| 203 | - $getter = 'get' . ucfirst($name); |
|
| 203 | + $getter = 'get'.ucfirst($name); |
|
| 204 | 204 | |
| 205 | 205 | $relationship->setGetter($getter); |
| 206 | 206 | return; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | */ |
| 234 | 234 | protected function createLink(LinkAnnotation $annotation): Link |
| 235 | 235 | { |
| 236 | - if (! preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 236 | + if (!preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 237 | 237 | throw new \LogicException(sprintf('Invalid resource definition: "%s"', $annotation->resource)); |
| 238 | 238 | } |
| 239 | 239 | |