@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition\AnnotationProcessor; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition\AnnotationProcessor; |
| 5 | 5 | |
@@ -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() |
@@ -209,13 +209,13 @@ discard block |
||
| 209 | 209 | */ |
| 210 | 210 | protected function processDataType(string $definition, Attribute $attribute) |
| 211 | 211 | { |
| 212 | - if (! preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 212 | + if (!preg_match(self::DATATYPE_PATTERN, $definition, $matches)) { |
|
| 213 | 213 | throw new \LogicException(sprintf('Data-type definition "%s" is invalid.', $definition)); |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $attribute->setType($matches['type']); |
| 217 | 217 | |
| 218 | - if (! empty($matches['many'])) { |
|
| 218 | + if (!empty($matches['many'])) { |
|
| 219 | 219 | $attribute->setMany(); |
| 220 | 220 | } |
| 221 | 221 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition\AnnotationProcessor; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition; |
| 5 | 5 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function getDefinition(string $class): Definition |
| 56 | 56 | { |
| 57 | - if (! isset($this->definitions[$class])) { |
|
| 57 | + if (!isset($this->definitions[$class])) { |
|
| 58 | 58 | $this->definitions[$class] = $this->provideDefinition($class); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function provideDefinition(string $class): Definition |
| 71 | 71 | { |
| 72 | - $key = self::PREFIX . md5($class); |
|
| 72 | + $key = self::PREFIX.md5($class); |
|
| 73 | 73 | $item = $this->cache->getItem($key); |
| 74 | 74 | |
| 75 | 75 | if ($item->isHit()) { |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition\Behaviour; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition\Behaviour; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition; |
| 5 | 5 | use Mikemirten\Component\JsonApi\Mapper\Definition\AnnotationProcessor\AnnotationProcessorInterface; |
@@ -40,7 +40,7 @@ discard block |
||
| 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); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition; |
| 5 | 5 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function getDefinition(string $class): Definition |
| 112 | 112 | { |
| 113 | - if (! isset($this->definitionCache[$class])) { |
|
| 113 | + if (!isset($this->definitionCache[$class])) { |
|
| 114 | 114 | $this->definitionCache[$class] = $this->createDefinition($class); |
| 115 | 115 | } |
| 116 | 116 | |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | protected function createDefinition(string $class): Definition |
| 127 | 127 | { |
| 128 | - $path = $this->basePath . DIRECTORY_SEPARATOR . str_replace('\\', '.', $class) . '.yml'; |
|
| 128 | + $path = $this->basePath.DIRECTORY_SEPARATOR.str_replace('\\', '.', $class).'.yml'; |
|
| 129 | 129 | |
| 130 | - if (! is_file($path)) { |
|
| 130 | + if (!is_file($path)) { |
|
| 131 | 131 | throw new DefinitionNotFoundException($class); |
| 132 | 132 | } |
| 133 | 133 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | protected function readConfig(string $path): array |
| 152 | 152 | { |
| 153 | - if (! is_readable($path)) { |
|
| 153 | + if (!is_readable($path)) { |
|
| 154 | 154 | throw new DefinitionProviderException(sprintf('File "%s" with definition is not readable.', $path)); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Mikemirten\Component\JsonApi\Mapper\Definition; |
| 5 | 5 | |