@@ -64,7 +64,7 @@ |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @param string|DateTime $value |
|
| 67 | + * @param string $value |
|
| 68 | 68 | * @param string $fromFormat |
| 69 | 69 | * @param string $toFormat |
| 70 | 70 | * |
@@ -186,7 +186,7 @@ |
||
| 186 | 186 | return [static::DATA => $data->getData()]; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $buildUrl = function ($offset) use ($data, $uri) { |
|
| 189 | + $buildUrl = function($offset) use ($data, $uri) { |
|
| 190 | 190 | $paramsWithPaging = [ |
| 191 | 191 | PaginationStrategyInterface::PARAM_PAGING_SKIP => $offset, |
| 192 | 192 | PaginationStrategyInterface::PARAM_PAGING_SIZE => $data->getLimit(), |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | { |
| 158 | 158 | parse_str($this->getOriginalUri()->getQuery(), $queryParams); |
| 159 | 159 | |
| 160 | - return function ($offset) use ($pageSize, $queryParams) { |
|
| 160 | + return function($offset) use ($pageSize, $queryParams) { |
|
| 161 | 161 | $paramsWithPaging = array_merge($queryParams, [ |
| 162 | 162 | QueryParametersParserInterface::PARAM_PAGE => [ |
| 163 | 163 | PaginationStrategyInterface::PARAM_PAGING_SKIP => $offset, |
@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?php namespace Limoncello\Flute\Contracts\Models; |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * Copyright 2015-2017 [email protected] |
|
| 5 | - * |
|
| 6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | - * you may not use this file except in compliance with the License. |
|
| 8 | - * You may obtain a copy of the License at |
|
| 9 | - * |
|
| 10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | - * |
|
| 12 | - * Unless required by applicable law or agreed to in writing, software |
|
| 13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | - * See the License for the specific language governing permissions and |
|
| 16 | - * limitations under the License. |
|
| 17 | - */ |
|
| 4 | + * Copyright 2015-2017 [email protected] |
|
| 5 | + * |
|
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | + * you may not use this file except in compliance with the License. |
|
| 8 | + * You may obtain a copy of the License at |
|
| 9 | + * |
|
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | + * |
|
| 12 | + * Unless required by applicable law or agreed to in writing, software |
|
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | + * See the License for the specific language governing permissions and |
|
| 16 | + * limitations under the License. |
|
| 17 | + */ |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @package Limoncello\Flute |
@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?php namespace Limoncello\Flute\Contracts\Adapters; |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * Copyright 2015-2017 [email protected] |
|
| 5 | - * |
|
| 6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | - * you may not use this file except in compliance with the License. |
|
| 8 | - * You may obtain a copy of the License at |
|
| 9 | - * |
|
| 10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | - * |
|
| 12 | - * Unless required by applicable law or agreed to in writing, software |
|
| 13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | - * See the License for the specific language governing permissions and |
|
| 16 | - * limitations under the License. |
|
| 17 | - */ |
|
| 4 | + * Copyright 2015-2017 [email protected] |
|
| 5 | + * |
|
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | + * you may not use this file except in compliance with the License. |
|
| 8 | + * You may obtain a copy of the License at |
|
| 9 | + * |
|
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | + * |
|
| 12 | + * Unless required by applicable law or agreed to in writing, software |
|
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | + * See the License for the specific language governing permissions and |
|
| 16 | + * limitations under the License. |
|
| 17 | + */ |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @package Limoncello\Flute |
@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?php namespace Limoncello\Flute\Contracts\Adapters; |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * Copyright 2015-2017 [email protected] |
|
| 5 | - * |
|
| 6 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | - * you may not use this file except in compliance with the License. |
|
| 8 | - * You may obtain a copy of the License at |
|
| 9 | - * |
|
| 10 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | - * |
|
| 12 | - * Unless required by applicable law or agreed to in writing, software |
|
| 13 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | - * See the License for the specific language governing permissions and |
|
| 16 | - * limitations under the License. |
|
| 17 | - */ |
|
| 4 | + * Copyright 2015-2017 [email protected] |
|
| 5 | + * |
|
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 7 | + * you may not use this file except in compliance with the License. |
|
| 8 | + * You may obtain a copy of the License at |
|
| 9 | + * |
|
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 11 | + * |
|
| 12 | + * Unless required by applicable law or agreed to in writing, software |
|
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 15 | + * See the License for the specific language governing permissions and |
|
| 16 | + * limitations under the License. |
|
| 17 | + */ |
|
| 18 | 18 | use Doctrine\DBAL\Query\Expression\CompositeExpression; |
| 19 | 19 | use Doctrine\DBAL\Query\QueryBuilder; |
| 20 | 20 | use Neomerx\JsonApi\Exceptions\ErrorCollection; |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | $saveMain = $this->getRepository()->create($modelClass, $allowedChanges); |
| 324 | 324 | $saveMain = $this->builderSaveResourceOnCreate($saveMain); |
| 325 | 325 | $saveMain->getSQL(); // prepare |
| 326 | - $this->inTransaction(function () use ($modelClass, $saveMain, $toMany, &$index) { |
|
| 326 | + $this->inTransaction(function() use ($modelClass, $saveMain, $toMany, &$index) { |
|
| 327 | 327 | $saveMain->execute(); |
| 328 | 328 | // if no index given will use last insert ID as index |
| 329 | 329 | $index !== null ?: $index = $saveMain->getConnection()->lastInsertId(); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $saveMain = $this->getRepository()->update($modelClass, $index, $allowedChanges); |
| 357 | 357 | $saveMain = $this->builderSaveResourceOnUpdate($saveMain); |
| 358 | 358 | $saveMain->getSQL(); // prepare |
| 359 | - $this->inTransaction(function () use ($modelClass, $saveMain, $toMany, $index, &$updated) { |
|
| 359 | + $this->inTransaction(function() use ($modelClass, $saveMain, $toMany, $index, &$updated) { |
|
| 360 | 360 | $updated = $saveMain->execute(); |
| 361 | 361 | foreach ($toMany as $name => $values) { |
| 362 | 362 | $indexBind = ':index'; |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | $subUri = $type = $schemeClass::TYPE; |
| 50 | 50 | |
| 51 | 51 | $indexSlug = '/{' . BaseController::ROUTE_KEY_INDEX . '}'; |
| 52 | - $params = function ($method) use ($type) { |
|
| 52 | + $params = function($method) use ($type) { |
|
| 53 | 53 | return [RouteInterface::PARAM_NAME => $type . '_' . $method]; |
| 54 | 54 | }; |
| 55 | - $handler = function ($method) use ($controllerClass) { |
|
| 55 | + $handler = function($method) use ($controllerClass) { |
|
| 56 | 56 | return [$controllerClass, $method]; |
| 57 | 57 | }; |
| 58 | 58 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | /** @var SchemaInterface $schemaClass */ |
| 86 | 86 | assert(array_key_exists(SchemaInterface::class, class_implements($schemaClass)) === true); |
| 87 | - $subUri = $schemaClass::TYPE; |
|
| 87 | + $subUri = $schemaClass::TYPE; |
|
| 88 | 88 | |
| 89 | 89 | /** @var string $controllerClass */ |
| 90 | 90 | /** @var string $schemaClass */ |
@@ -181,8 +181,7 @@ discard block |
||
| 181 | 181 | foreach ($values as $value) { |
| 182 | 182 | $placeholders[] = $builder->createNamedParameter((string)$value); |
| 183 | 183 | } |
| 184 | - $placeholders === null ?: |
|
| 185 | - $link->add($builder->expr()->in($this->getTableColumn($table, $column), $placeholders)); |
|
| 184 | + $placeholders === null ?: $link->add($builder->expr()->in($this->getTableColumn($table, $column), $placeholders)); |
|
| 186 | 185 | } |
| 187 | 186 | |
| 188 | 187 | /** |
@@ -205,8 +204,7 @@ discard block |
||
| 205 | 204 | foreach ($values as $value) { |
| 206 | 205 | $placeholders[] = $builder->createNamedParameter((string)$value); |
| 207 | 206 | } |
| 208 | - $placeholders === null ?: |
|
| 209 | - $link->add($builder->expr()->notIn($this->getTableColumn($table, $column), $placeholders)); |
|
| 207 | + $placeholders === null ?: $link->add($builder->expr()->notIn($this->getTableColumn($table, $column), $placeholders)); |
|
| 210 | 208 | } |
| 211 | 209 | |
| 212 | 210 | /** |