Completed
Push — develop ( d029a9...697864 )
by Neomerx
05:58 queued 04:18
created
src/Validation/JsonApi/QueryParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     ) {
156 156
         assert(
157 157
             in_array(JsonApiQueryRulesSerializerInterface::class, class_implements($serializerClass)),
158
-            "`$serializerClass` should implement interface `" . JsonApiQueryRulesSerializerInterface::class . '`.'
158
+            "`$serializerClass` should implement interface `".JsonApiQueryRulesSerializerInterface::class.'`.'
159 159
         );
160 160
 
161 161
         $parameters = [];
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
     {
572 572
         // no validation rule means we should accept any input value
573 573
         if ($ruleIndexes === null) {
574
-            return is_numeric($value) === true ? (int)$value : 0;
574
+            return is_numeric($value) === true ? (int) $value : 0;
575 575
         }
576 576
 
577 577
         $ruleIndex = $this->serializerClass::readRuleMainIndex($ruleIndexes);
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 
583 583
         $validatedValue = $this->readSingleCapturedValue();
584 584
 
585
-        return (int)$validatedValue;
585
+        return (int) $validatedValue;
586 586
     }
587 587
 
588 588
     /**
Please login to merge, or discard this patch.
src/Http/Query/ParametersMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     public function getMappedIncludes(): iterable
247 247
     {
248 248
         $fromSchema        = $this->getRootSchema();
249
-        $getMappedRelLinks = function (iterable $links) use ($fromSchema) : iterable {
249
+        $getMappedRelLinks = function(iterable $links) use ($fromSchema) : iterable {
250 250
             foreach ($links as $link) {
251 251
                 assert(is_string($link));
252 252
                 $fromSchemaClass = get_class($fromSchema);
@@ -296,14 +296,14 @@  discard block
 block discarded – undo
296 296
         //     ['rel2_name1', ],
297 297
         //     ['rel3_name1', 'rel3_name2', 'rel3_name3', ],
298 298
         // ]
299
-        $includeAsModelNames = function (iterable $relationships): iterable {
299
+        $includeAsModelNames = function(iterable $relationships): iterable {
300 300
             foreach ($relationships as $relationship) {
301 301
                 assert($relationship instanceof RelationshipInterface);
302 302
                 yield $relationship->getNameInModel();
303 303
             }
304 304
         };
305 305
         $mappedIncludes      = $this->getMappedIncludes();
306
-        $getIncludes         = function () use ($mappedIncludes, $includeAsModelNames) : iterable {
306
+        $getIncludes         = function() use ($mappedIncludes, $includeAsModelNames) : iterable {
307 307
             foreach ($mappedIncludes as $relationships) {
308 308
                 yield $includeAsModelNames($relationships);
309 309
             }
Please login to merge, or discard this patch.
src/Package/FluteSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,10 +111,10 @@
 block discarded – undo
111 111
         );
112 112
         assert(empty($jsonQueryValFileMask) === false, "Invalid Query Validators file mask `$jsonQueryValFileMask`.");
113 113
 
114
-        $schemasPath         = $schemasFolder . DIRECTORY_SEPARATOR . $schemasFileMask;
115
-        $jsonDataValPath     = $jsonDataValFolder . DIRECTORY_SEPARATOR . $jsonDataValFileMask;
116
-        $formsValidatorsPath = $formsValFolder . DIRECTORY_SEPARATOR . $formsValFileMask;
117
-        $jsonQueryValPath    = $jsonQueryValFolder . DIRECTORY_SEPARATOR . $jsonQueryValFileMask;
114
+        $schemasPath         = $schemasFolder.DIRECTORY_SEPARATOR.$schemasFileMask;
115
+        $jsonDataValPath     = $jsonDataValFolder.DIRECTORY_SEPARATOR.$jsonDataValFileMask;
116
+        $formsValidatorsPath = $formsValFolder.DIRECTORY_SEPARATOR.$formsValFileMask;
117
+        $jsonQueryValPath    = $jsonQueryValFolder.DIRECTORY_SEPARATOR.$jsonQueryValFileMask;
118 118
 
119 119
         $requireUniqueTypes = $defaults[static::KEY_SCHEMAS_REQUIRE_UNIQUE_TYPES] ?? true;
120 120
 
Please login to merge, or discard this patch.
src/Http/JsonApiBaseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         static::assertClassValueDefined(static::SCHEMA_CLASS);
209 209
 
210 210
         $api     = static::defaultCreateApi($container, static::API_CLASS);
211
-        $handler = function () use ($api, $index, $modelRelName) {
211
+        $handler = function() use ($api, $index, $modelRelName) {
212 212
             return $api->readRelationship($index, $modelRelName);
213 213
         };
214 214
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         static::assertClassValueDefined(static::SCHEMA_CLASS);
249 249
 
250 250
         $api     = static::defaultCreateApi($container, static::API_CLASS);
251
-        $handler = function () use ($api, $index, $modelRelName) {
251
+        $handler = function() use ($api, $index, $modelRelName) {
252 252
             return $api->readRelationship($index, $modelRelName);
253 253
         };
254 254
 
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ToManyRelationshipTypeCheckerRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@
 block discarded – undo
71 71
         }
72 72
 
73 73
         $reply = $foundInvalidType === null ?
74
-            static::createSuccessReply($indexes) :
75
-            static::createErrorReply($context, $foundInvalidType, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
74
+            static::createSuccessReply($indexes) : static::createErrorReply($context, $foundInvalidType, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
76 75
 
77 76
         return $reply;
78 77
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/IsReadableViaApiRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,6 @@
 block discarded – undo
76 76
         $result = !empty($data);
77 77
 
78 78
         return $result === true ?
79
-            static::createSuccessReply($value) :
80
-            static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
79
+            static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
81 80
     }
82 81
 }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/UniqueInDbTableSingleWithDoctrineRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@
 block discarded – undo
81 81
         }
82 82
 
83 83
         $reply = $count <= 0 ?
84
-            static::createSuccessReply($value) :
85
-            static::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE);
84
+            static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE);
86 85
 
87 86
         return $reply;
88 87
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ExistInDbTableSingleWithDoctrineRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@
 block discarded – undo
82 82
         }
83 83
 
84 84
         $reply = $count > 0 ?
85
-            static::createSuccessReply($value) :
86
-            static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
85
+            static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
87 86
 
88 87
         return $reply;
89 88
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ToOneRelationshipTypeCheckerRule.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@
 block discarded – undo
62 62
         assert(is_scalar($index) === true && is_scalar($type) === true);
63 63
         $expectedType = $context->getProperties()->getProperty(static::PROPERTY_RESOURCE_TYPE);
64 64
         $reply        = $type === $expectedType ?
65
-            static::createSuccessReply($index) :
66
-            static::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
65
+            static::createSuccessReply($index) : static::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
67 66
 
68 67
         return $reply;
69 68
     }
Please login to merge, or discard this patch.