@@ -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\Handler\TypeHandler; |
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\Handler\IdentifierHandler; |
5 | 5 | use Mikemirten\Component\JsonApi\Mapper\MappingContext; |
@@ -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\Handler\IdentifierHandler; |
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\Handler; |
5 | 5 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function toResource(Attribute $definition, $value) |
46 | 46 | { |
47 | - if (! $definition->hasType()) { |
|
47 | + if (!$definition->hasType()) { |
|
48 | 48 | return $this->processNotTypedToResource($definition, $value); |
49 | 49 | } |
50 | 50 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function fromResource(Attribute $definition, $value) |
68 | 68 | { |
69 | - if (! $definition->hasType()) { |
|
69 | + if (!$definition->hasType()) { |
|
70 | 70 | return $this->processNotTypedFromResource($definition, $value); |
71 | 71 | } |
72 | 72 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | protected function processNotTypedToResource(Attribute $definition, $value) |
92 | 92 | { |
93 | - if (! $definition->isMany()) { |
|
93 | + if (!$definition->isMany()) { |
|
94 | 94 | return $value; |
95 | 95 | } |
96 | 96 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | protected function processNotTypedFromResource(Attribute $definition, $value) |
118 | 118 | { |
119 | - if (! $definition->isMany()) { |
|
119 | + if (!$definition->isMany()) { |
|
120 | 120 | return $value; |
121 | 121 | } |
122 | 122 | |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | $handler = $this->handlers[$type]; |
147 | 147 | $parameters = $definition->getTypeParameters(); |
148 | 148 | |
149 | - if (! $definition->isMany()) { |
|
149 | + if (!$definition->isMany()) { |
|
150 | 150 | return $handler->toResource($value, $type, $parameters); |
151 | 151 | } |
152 | 152 | |
153 | - if (! $value instanceof \Traversable && ! is_array($value)) { |
|
153 | + if (!$value instanceof \Traversable && !is_array($value)) { |
|
154 | 154 | throw new NotIterableAttribute($definition, $value); |
155 | 155 | } |
156 | 156 | |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | $handler = $this->handlers[$type]; |
179 | 179 | $parameters = $definition->getTypeParameters(); |
180 | 180 | |
181 | - if (! $definition->isMany()) { |
|
181 | + if (!$definition->isMany()) { |
|
182 | 182 | return $handler->fromResource($value, $type, $parameters); |
183 | 183 | } |
184 | 184 | |
185 | - if (! $value instanceof \Traversable && ! is_array($value)) { |
|
185 | + if (!$value instanceof \Traversable && !is_array($value)) { |
|
186 | 186 | throw new NotIterableAttribute($definition, $value); |
187 | 187 | } |
188 | 188 |
@@ -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\Handler\Exception; |
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\Handler\Exception; |
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\Handler\Exception; |
5 | 5 | |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | $type = gettype($value); |
58 | 58 | |
59 | 59 | if ($type === 'object') { |
60 | - return 'an instance of ' . get_class($value); |
|
60 | + return 'an instance of '.get_class($value); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if ($type === 'integer') { |
64 | 64 | return 'an integer'; |
65 | 65 | } |
66 | 66 | |
67 | - return 'a ' . $type; |
|
67 | + return 'a '.$type; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -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\Handler; |
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\Handler; |
5 | 5 | |
@@ -71,7 +71,7 @@ discard block |
||
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 |