@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Schema; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Adapters; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Api; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Exceptions; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Encoder; |
| 4 | 4 | |
@@ -3,20 +3,20 @@ |
||
| 3 | 3 | namespace Limoncello\Flute\Contracts\Models; |
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | - * Copyright 2015-2019 [email protected] |
|
| 7 | - * |
|
| 8 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 9 | - * you may not use this file except in compliance with the License. |
|
| 10 | - * You may obtain a copy of the License at |
|
| 11 | - * |
|
| 12 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 13 | - * |
|
| 14 | - * Unless required by applicable law or agreed to in writing, software |
|
| 15 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 16 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 17 | - * See the License for the specific language governing permissions and |
|
| 18 | - * limitations under the License. |
|
| 19 | - */ |
|
| 6 | + * Copyright 2015-2019 [email protected] |
|
| 7 | + * |
|
| 8 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 9 | + * you may not use this file except in compliance with the License. |
|
| 10 | + * You may obtain a copy of the License at |
|
| 11 | + * |
|
| 12 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 13 | + * |
|
| 14 | + * Unless required by applicable law or agreed to in writing, software |
|
| 15 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 16 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 17 | + * See the License for the specific language governing permissions and |
|
| 18 | + * limitations under the License. |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @package Limoncello\Flute |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Models; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Contracts\Validation; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\Flute\Schema; |
| 4 | 4 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if ($belongsToFkName !== null && $this->hasProperty($model, $belongsToFkName) === true) { |
| 163 | 163 | $reverseIndex = $model->{$belongsToFkName}; |
| 164 | 164 | $identifier = $reverseIndex === null ? |
| 165 | - null : new Identifier((string)$reverseIndex, $reverseType, false, null); |
|
| 165 | + null : new Identifier((string) $reverseIndex, $reverseType, false, null); |
|
| 166 | 166 | |
| 167 | 167 | yield $jsonRelName => [ |
| 168 | 168 | static::RELATIONSHIP_DATA => $identifier, |
@@ -237,14 +237,14 @@ discard block |
||
| 237 | 237 | // if we are here then relationship contains paginated data, so we have to add pagination links |
| 238 | 238 | $offset = $relationshipData->getOffset(); |
| 239 | 239 | $limit = $relationshipData->getLimit(); |
| 240 | - $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName) . '?'; |
|
| 241 | - $buildLink = function (int $offset, int $limit) use ($urlPrefix) : LinkInterface { |
|
| 240 | + $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName).'?'; |
|
| 241 | + $buildLink = function(int $offset, int $limit) use ($urlPrefix) : LinkInterface { |
|
| 242 | 242 | $paramsWithPaging = [ |
| 243 | 243 | JsonApiQueryParserInterface::PARAM_PAGING_OFFSET => $offset, |
| 244 | 244 | JsonApiQueryParserInterface::PARAM_PAGING_LIMIT => $limit, |
| 245 | 245 | ]; |
| 246 | 246 | |
| 247 | - $subUrl = $urlPrefix . http_build_query($paramsWithPaging); |
|
| 247 | + $subUrl = $urlPrefix.http_build_query($paramsWithPaging); |
|
| 248 | 248 | |
| 249 | 249 | return $this->getFactory()->createLink(true, $subUrl, false); |
| 250 | 250 | }; |
@@ -343,6 +343,6 @@ discard block |
||
| 343 | 343 | */ |
| 344 | 344 | private function getRelationshipSelfSubUrl(ModelInterface $model, string $jsonRelName): string |
| 345 | 345 | { |
| 346 | - return $this->getSelfSubUrl($model) . '/relationships/' . $jsonRelName; |
|
| 346 | + return $this->getSelfSubUrl($model).'/relationships/'.$jsonRelName; |
|
| 347 | 347 | } |
| 348 | 348 | } |