@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | static protected function registerAnnotations() |
| 55 | 55 | { |
| 56 | 56 | if (self::$annotationsRegistered === false) { |
| 57 | - AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/ResourceIdentifier.php'); |
|
| 58 | - AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/Relationship.php'); |
|
| 59 | - AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/Attribute.php'); |
|
| 60 | - AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/Link.php'); |
|
| 57 | + AnnotationRegistry::registerFile(__DIR__.'/../Annotation/ResourceIdentifier.php'); |
|
| 58 | + AnnotationRegistry::registerFile(__DIR__.'/../Annotation/Relationship.php'); |
|
| 59 | + AnnotationRegistry::registerFile(__DIR__.'/../Annotation/Attribute.php'); |
|
| 60 | + AnnotationRegistry::registerFile(__DIR__.'/../Annotation/Link.php'); |
|
| 61 | 61 | |
| 62 | 62 | self::$annotationsRegistered = true; |
| 63 | 63 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | protected function createLink(LinkAnnotation $annotation): Link |
| 73 | 73 | { |
| 74 | - if (! preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 74 | + if (!preg_match(self::RESOURCE_PATTERN, $annotation->resource, $matches)) { |
|
| 75 | 75 | throw new \LogicException(sprintf('Invalid resource definition: "%s"', $annotation->resource)); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | foreach (['get', 'is'] as $prefix) |
| 102 | 102 | { |
| 103 | - $getter = $prefix . ucfirst($name); |
|
| 103 | + $getter = $prefix.ucfirst($name); |
|
| 104 | 104 | |
| 105 | 105 | if ($class->hasMethod($getter) && $class->getMethod($getter)->isPublic()) { |
| 106 | 106 | return $getter; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | throw new \LogicException(sprintf( |
| 111 | - 'Getter-method for the property "%s" cannot be resolved automatically. ' . |
|
| 111 | + 'Getter-method for the property "%s" cannot be resolved automatically. '. |
|
| 112 | 112 | 'Probably there is no get%2$s() or is%2$s() method or it is not public.', |
| 113 | 113 | $name, ucfirst($name) |
| 114 | 114 | )); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $name = $property->getName(); |
| 126 | 126 | $class = $property->getDeclaringClass(); |
| 127 | 127 | |
| 128 | - $setter = 'set' . ucfirst($name); |
|
| 128 | + $setter = 'set'.ucfirst($name); |
|
| 129 | 129 | |
| 130 | 130 | if ($class->hasMethod($setter) && $class->getMethod($setter)->isPublic()) { |
| 131 | 131 | return $setter; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | protected function validateMethodAttribute(AttributeAnnotation $annotation, \ReflectionMethod $method) |
| 91 | 91 | { |
| 92 | - if (! $method->isPublic()) { |
|
| 92 | + if (!$method->isPublic()) { |
|
| 93 | 93 | throw new \LogicException(sprintf( |
| 94 | 94 | 'Attribute annotation can be applied only to non public method "%s".', |
| 95 | 95 | $method->getName() |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | protected function processDataType(string $definition, Attribute $attribute) |
| 207 | 207 | { |
| 208 | - if (! preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 208 | + if (!preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 209 | 209 | throw new \LogicException(sprintf('Data-type definition "%s" is invalid.', $definition)); |
| 210 | 210 | } |
| 211 | 211 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDefinition(string $class): Definition |
| 42 | 42 | { |
| 43 | - if (! isset($this->definitionCache[$class])) { |
|
| 43 | + if (!isset($this->definitionCache[$class])) { |
|
| 44 | 44 | $reflection = new \ReflectionClass($class); |
| 45 | 45 | |
| 46 | 46 | $this->definitionCache[$class] = $this->createDefinition($reflection); |