Completed
Push — develop ( 599906...c694a4 )
by Neomerx
03:50 queued 02:08
created
src/Http/QueryTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      *
175 175
      * @return null|SortParameterInterface[]
176 176
      */
177
-    protected function mapSortParameters(ErrorCollection $errors, array $parameters = null): ?array
177
+    protected function mapSortParameters(ErrorCollection $errors, array $parameters = null): ? array
178 178
     {
179 179
         $sorts = null;
180 180
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      *
200 200
      * @return null|IncludeParameterInterface[]
201 201
      */
202
-    protected function mapIncludeParameters(ErrorCollection $errors, array $parameters = null): ?array
202
+    protected function mapIncludeParameters(ErrorCollection $errors, array $parameters = null): ? array
203 203
     {
204 204
         $includes = null;
205 205
 
Please login to merge, or discard this patch.
src/Contracts/Api/CrudInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
      *
125 125
      * @return array|null
126 126
      */
127
-    public function readRow($index): ?array;
127
+    public function readRow($index): ? array;
128 128
 
129 129
     /**
130 130
      * @param FilterParameterCollection|null $filterParams
Please login to merge, or discard this patch.
src/Contracts/Schema/JsonSchemesInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      *
35 35
      * @return self
36 36
      */
37
-    public function setRelationshipStorage(?RelationshipStorageInterface $storage): self;
37
+    public function setRelationshipStorage(?RelationshipStorageInterface $storage) : self;
38 38
 
39 39
     /**
40 40
      * @param string $schemaClass
Please login to merge, or discard this patch.
src/Schema/JsonSchemes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     /**
62 62
      * @inheritdoc
63 63
      */
64
-    public function setRelationshipStorage(?RelationshipStorageInterface $storage): JsonSchemesInterface
64
+    public function setRelationshipStorage(?RelationshipStorageInterface $storage) : JsonSchemesInterface
65 65
     {
66 66
         $this->relationshipStorage = $storage;
67 67
 
Please login to merge, or discard this patch.
src/Api/Crud.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
     /**
307 307
      * @inheritdoc
308 308
      */
309
-    public function readRow($index): ?array
309
+    public function readRow($index): ? array
310 310
     {
311 311
         if ($index !== null && is_scalar($index) === false) {
312 312
             throw new InvalidArgumentException(
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
         $deleted = $builder->execute();
344 344
 
345
-        return (int)$deleted;
345
+        return (int) $deleted;
346 346
     }
347 347
 
348 348
     /**
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         $saveMain = $this->getRepository()->create($modelClass, $allowedChanges);
364 364
         $saveMain = $this->builderSaveResourceOnCreate($saveMain);
365 365
         $saveMain->getSQL(); // prepare
366
-        $this->inTransaction(function () use ($modelClass, $saveMain, $toMany, &$index) {
366
+        $this->inTransaction(function() use ($modelClass, $saveMain, $toMany, &$index) {
367 367
             $saveMain->execute();
368 368
             // if no index given will use last insert ID as index
369 369
             $index !== null ?: $index = $saveMain->getConnection()->lastInsertId();
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $saveMain = $this->getRepository()->update($modelClass, $index, $allowedChanges);
403 403
         $saveMain = $this->builderSaveResourceOnUpdate($saveMain);
404 404
         $saveMain->getSQL(); // prepare
405
-        $this->inTransaction(function () use ($modelClass, $saveMain, $toMany, $index, &$updated) {
405
+        $this->inTransaction(function() use ($modelClass, $saveMain, $toMany, $index, &$updated) {
406 406
             $updated = $saveMain->execute();
407 407
             foreach ($toMany as $name => $values) {
408 408
                 $indexBind      = ':index';
@@ -417,12 +417,12 @@  discard block
 block discarded – undo
417 417
                 $saveToMany = $this->builderSaveRelationshipOnUpdate($name, $saveToMany);
418 418
                 $saveToMany->setParameter($indexBind, $index);
419 419
                 foreach ($values as $value) {
420
-                    $updated += (int)$saveToMany->setParameter($otherIndexBind, $value)->execute();
420
+                    $updated += (int) $saveToMany->setParameter($otherIndexBind, $value)->execute();
421 421
                 }
422 422
             }
423 423
         });
424 424
 
425
-        return (int)$updated;
425
+        return (int) $updated;
426 426
     }
427 427
 
428 428
     /**
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      *
528 528
      * @return array|null
529 529
      */
530
-    protected function fetchRow(QueryBuilder $builder, string $class): ?array
530
+    protected function fetchRow(QueryBuilder $builder, string $class): ? array
531 531
     {
532 532
         $statement = $builder->execute();
533 533
         $statement->setFetchMode(PDOConnection::FETCH_ASSOC);
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
             foreach ($path->getPath() as $pathPiece) {
840 840
                 $parent                    = $tmpPath;
841 841
                 $tmpPath                   = empty($tmpPath) === true ?
842
-                    $pathPiece : $tmpPath . static::PATH_SEPARATOR . $pathPiece;
842
+                    $pathPiece : $tmpPath.static::PATH_SEPARATOR.$pathPiece;
843 843
                 $normalizedPaths[$tmpPath] = [$parent, $pathPiece];
844 844
                 $pathsDepths[$parent]      = $parentDepth++;
845 845
             }
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
         // $models.
891 891
 
892 892
         foreach ($childRelationships as $name) {
893
-            $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath . static::PATH_SEPARATOR . $name : $name;
893
+            $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath.static::PATH_SEPARATOR.$name : $name;
894 894
 
895 895
             /** @var QueryBuilder $builder */
896 896
             list ($builder, $class, $relationshipType) =
Please login to merge, or discard this patch.
src/Http/BaseController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $queryParser    = $container->get(QueryParametersParserInterface::class);
125 125
         $encodingParams = $queryParser->parse($request);
126 126
 
127
-        list ($filters, , $includes) = static::mapQueryParameters($container, $encodingParams, static::SCHEMA_CLASS);
127
+        list ($filters,, $includes) = static::mapQueryParameters($container, $encodingParams, static::SCHEMA_CLASS);
128 128
 
129 129
         $index    = $routeParams[static::ROUTE_KEY_INDEX];
130 130
         $response = static::readImpl(
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
      */
275 275
     protected static function readJsonFromRequest(ContainerInterface $container, ServerRequestInterface $request): array
276 276
     {
277
-        $body = (string)$request->getBody();
277
+        $body = (string) $request->getBody();
278 278
         if (empty($body) === true || ($json = json_decode($body, true)) === null) {
279 279
             /** @var FactoryInterface $factory */
280 280
             $factory = $container->get(FactoryInterface::class);
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
     {
403 403
         assert(
404 404
             empty(static::ON_CREATE_VALIDATION_RULES_SET_CLASS) === false,
405
-            'Validation rules set should be defined for class ' . static::class . '.'
405
+            'Validation rules set should be defined for class '.static::class.'.'
406 406
         );
407 407
 
408 408
         return static::createJsonApiValidator($container, static::ON_CREATE_VALIDATION_RULES_SET_CLASS);
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
     {
418 418
         assert(
419 419
             empty(static::ON_UPDATE_VALIDATION_RULES_SET_CLASS) === false,
420
-            'Validation rules set should be defined for class ' . static::class . '.'
420
+            'Validation rules set should be defined for class '.static::class.'.'
421 421
         );
422 422
 
423 423
         return static::createJsonApiValidator($container, static::ON_UPDATE_VALIDATION_RULES_SET_CLASS);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
         /** @var JsonSchemesInterface $jsonSchemes */
533 533
         $jsonSchemes  = $container->get(JsonSchemesInterface::class);
534 534
         $targetSchema = $jsonSchemes->getRelationshipSchema(static::SCHEMA_CLASS, $relationshipName);
535
-        list ($filters, $sorts, , $paging) =
535
+        list ($filters, $sorts,, $paging) =
536 536
             static::mapQueryParameters($container, $encodingParams, get_class($targetSchema));
537 537
 
538 538
         /** @var SchemaInterface $schemaClass */
Please login to merge, or discard this patch.
src/Validation/ValidatorWrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
      */
143 143
     protected function setWrapperErrors(array $wrapperErrors): self
144 144
     {
145
-        assert(call_user_func(function () use ($wrapperErrors) : bool {
145
+        assert(call_user_func(function() use ($wrapperErrors) : bool {
146 146
             $allAreErrors = true;
147 147
 
148 148
             foreach ($wrapperErrors as $error) {
Please login to merge, or discard this patch.