Completed
Push — develop ( 5571b3...27d944 )
by Neomerx
08:26 queued 06:22
created
src/Http/BaseController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     protected static function readJsonFromRequest(ContainerInterface $container, ServerRequestInterface $request): array
242 242
     {
243
-        $body = (string)$request->getBody();
243
+        $body = (string) $request->getBody();
244 244
         if (empty($body) === true || ($json = json_decode($body, true)) === null) {
245 245
             /** @var FactoryInterface $factory */
246 246
             $factory = $container->get(FactoryInterface::class);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     {
384 384
         assert(
385 385
             empty(static::ON_CREATE_VALIDATION_RULES_SET_CLASS) === false,
386
-            'Validation rules set should be defined for class ' . static::class . '.'
386
+            'Validation rules set should be defined for class '.static::class.'.'
387 387
         );
388 388
 
389 389
         return static::createJsonApiValidator($container, static::ON_CREATE_VALIDATION_RULES_SET_CLASS);
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     {
399 399
         assert(
400 400
             empty(static::ON_UPDATE_VALIDATION_RULES_SET_CLASS) === false,
401
-            'Validation rules set should be defined for class ' . static::class . '.'
401
+            'Validation rules set should be defined for class '.static::class.'.'
402 402
         );
403 403
 
404 404
         return static::createJsonApiValidator($container, static::ON_UPDATE_VALIDATION_RULES_SET_CLASS);
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         ContainerInterface $container,
607 607
         ServerRequestInterface $request
608 608
     ): array {
609
-        $jsonData  = static::normalizeIndexValueOnUpdate(
609
+        $jsonData = static::normalizeIndexValueOnUpdate(
610 610
             $routeParams,
611 611
             $container,
612 612
             static::readJsonFromRequest($container, $request)
Please login to merge, or discard this patch.
src/Http/Query/QueryParser.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         // debug check all fields are strings
94 94
         assert(
95
-            (function () use ($fields) {
95
+            (function() use ($fields) {
96 96
                 $allAreStrings = !empty($fields);
97 97
                 foreach ($fields as $field) {
98 98
                     $allAreStrings = $allAreStrings === true && is_string($field) === true && empty($field) === false;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         // debug check all fields are strings
136 136
         assert(
137
-            (function () use ($fields) {
137
+            (function() use ($fields) {
138 138
                 $allAreStrings = !empty($fields);
139 139
                 foreach ($fields as $field) {
140 140
                     $allAreStrings = $allAreStrings === true && is_string($field) === true && empty($field) === false;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     {
177 177
         // debug check all fields are strings
178 178
         assert(
179
-            (function () use ($paths) {
179
+            (function() use ($paths) {
180 180
                 $allAreStrings = !empty($paths);
181 181
                 foreach ($paths as $path) {
182 182
                     $allAreStrings = $allAreStrings === true && is_string($path) === true && empty($path) === false;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -439,7 +439,7 @@
 block discarded – undo
439 439
      * @param string $parameterName
440 440
      * @param array  $value
441 441
      *
442
-     * @return iterable
442
+     * @return Generator
443 443
      *
444 444
      * @SuppressWarnings(PHPMD.ElseExpression)
445 445
      */
Please login to merge, or discard this patch.
src/Http/Query/QueryValidator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      * @param string   $name
271 271
      * @param iterable $operationsAndArgs
272 272
      *
273
-     * @return iterable
273
+     * @return \Generator
274 274
      */
275 275
     private function getValidatedOperationsAndArguments(
276 276
         int $blockIndex,
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      * @param string   $name
288 288
      * @param iterable $arguments
289 289
      *
290
-     * @return iterable
290
+     * @return \Generator
291 291
      */
292 292
     private function getValidatedArguments(int $blockIndex, string $name, iterable $arguments): iterable
293 293
     {
Please login to merge, or discard this patch.
src/Validation/JsonApi/ValidatorWrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     protected function setWrapperErrors(array $wrapperErrors): self
163 163
     {
164 164
         if (empty($wrapperErrors) === false) {
165
-            assert(call_user_func(function () use ($wrapperErrors) : bool {
165
+            assert(call_user_func(function() use ($wrapperErrors) : bool {
166 166
                 $allAreErrors = true;
167 167
 
168 168
                 foreach ($wrapperErrors as $error) {
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ExistInDbTableMultipleWithDoctrine.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
105 105
         }
106 106
 
107 107
         $reply = $count > 0 ?
108
-            BlockReplies::createSuccessReply($values) :
109
-            BlockReplies::createErrorReply($context, $values, ErrorCodes::EXIST_IN_DATABASE_MULTIPLE);
108
+            BlockReplies::createSuccessReply($values) : BlockReplies::createErrorReply($context, $values, ErrorCodes::EXIST_IN_DATABASE_MULTIPLE);
110 109
 
111 110
         return $reply;
112 111
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ToManyRelationshipTypeChecker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@
 block discarded – undo
86 86
         }
87 87
 
88 88
         $reply = $foundInvalidType === null ?
89
-            BlockReplies::createSuccessReply($indexes) :
90
-            BlockReplies::createErrorReply($context, $foundInvalidType, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
89
+            BlockReplies::createSuccessReply($indexes) : BlockReplies::createErrorReply($context, $foundInvalidType, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
91 90
 
92 91
         return $reply;
93 92
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ToOneRelationshipTypeChecker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
77 77
         assert(is_scalar($index) === true && is_scalar($type) === true);
78 78
         $expectedType = $context->getProperties()->getProperty(self::PROPERTY_RESOURCE_TYPE);
79 79
         $reply = $type === $expectedType ?
80
-            BlockReplies::createSuccessReply($index) :
81
-            BlockReplies::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
80
+            BlockReplies::createSuccessReply($index) : BlockReplies::createErrorReply($context, $type, ErrorCodes::INVALID_RELATIONSHIP_TYPE);
82 81
 
83 82
         return $reply;
84 83
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/UniqueInDbTableSingleWithDoctrine.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
         }
102 102
 
103 103
         $reply = $count <= 0 ?
104
-            BlockReplies::createSuccessReply($value) :
105
-            BlockReplies::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE);
104
+            BlockReplies::createSuccessReply($value) : BlockReplies::createErrorReply($context, $value, ErrorCodes::UNIQUE_IN_DATABASE_SINGLE);
106 105
 
107 106
         return $reply;
108 107
     }
Please login to merge, or discard this patch.
src/Validation/JsonApi/Rules/ExistInDbTableSingleWithDoctrine.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
         }
102 102
 
103 103
         $reply = $count > 0 ?
104
-            BlockReplies::createSuccessReply($value) :
105
-            BlockReplies::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
104
+            BlockReplies::createSuccessReply($value) : BlockReplies::createErrorReply($context, $value, ErrorCodes::EXIST_IN_DATABASE_SINGLE);
106 105
 
107 106
         return $reply;
108 107
     }
Please login to merge, or discard this patch.