Completed
Branch next (162523)
by Neomerx
04:26
created
src/Http/Headers/AcceptMediaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      */
88 88
     public static function getCompare(): Closure
89 89
     {
90
-        return function (AcceptMediaTypeInterface $lhs, AcceptMediaTypeInterface $rhs) {
90
+        return function(AcceptMediaTypeInterface $lhs, AcceptMediaTypeInterface $rhs) {
91 91
             $qualityCompare = self::compareQuality($lhs->getQuality(), $rhs->getQuality());
92 92
             if ($qualityCompare !== 0) {
93 93
                 return $qualityCompare;
Please login to merge, or discard this patch.
src/Http/Headers/MediaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     public function getMediaType(): string
98 98
     {
99 99
         if ($this->mediaType === null) {
100
-            $this->mediaType = $this->getType() . '/' . $this->getSubType();
100
+            $this->mediaType = $this->getType().'/'.$this->getSubType();
101 101
         }
102 102
 
103 103
         return $this->mediaType;
Please login to merge, or discard this patch.
src/Exceptions/JsonApiException.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     private $httpCode;
55 55
 
56 56
     /**
57
-     * @param ErrorInterface|iterable $errors
57
+     * @param ErrorInterface $errors
58 58
      * @param int                     $httpCode
59 59
      * @param Exception|null          $previous
60 60
      *
Please login to merge, or discard this patch.
src/Http/Query/BaseQueryParserTrait.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param array  $parameters
31 31
      * @param string $errorTitle
32 32
      *
33
-     * @return iterable
33
+     * @return \Generator
34 34
      */
35 35
     protected function getIncludes(array $parameters, string $errorTitle): iterable
36 36
     {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param array  $parameters
48 48
      * @param string $errorTitle
49 49
      *
50
-     * @return iterable
50
+     * @return \Generator
51 51
      */
52 52
     protected function getFields(array $parameters, string $errorTitle): iterable
53 53
     {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param array  $parameters
68 68
      * @param string $errorTitle
69 69
      *
70
-     * @return iterable
70
+     * @return \Generator
71 71
      */
72 72
     protected function getSorts(array $parameters, string $errorTitle): iterable
73 73
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param array  $parameters
100 100
      * @param string $errorTitle
101 101
      *
102
-     * @return iterable
102
+     * @return \Generator
103 103
      */
104 104
     protected function getProfileUrls(array $parameters, string $errorTitle): iterable
105 105
     {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * @param string|mixed $shouldBeString
120 120
      * @param string       $errorTitle
121 121
      *
122
-     * @return iterable
122
+     * @return \Generator
123 123
      */
124 124
     private function splitCommaSeparatedStringAndCheckNoEmpties(
125 125
         string $paramName,
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 
132 132
     /**
133 133
      * @param string       $paramName
134
-     * @param string|mixed $shouldBeString
134
+     * @param string $shouldBeString
135 135
      * @param string       $errorTitle
136 136
      *
137
-     * @return iterable
137
+     * @return \Generator
138 138
      */
139 139
     private function splitSpaceSeparatedStringAndCheckNoEmpties(
140 140
         string $paramName,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      * @param string       $separator
151 151
      * @param string       $errorTitle
152 152
      *
153
-     * @return iterable
153
+     * @return \Generator
154 154
      */
155 155
     private function splitStringAndCheckNoEmpties(
156 156
         string $paramName,
Please login to merge, or discard this patch.
src/Parser/BaseRelationshipData.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     }
80 80
 
81 81
     /**
82
-     * @param mixed $identifier
82
+     * @param SchemaIdentifierInterface $identifier
83 83
      *
84 84
      * @return ResourceInterface
85 85
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     {
69 69
         assert(
70 70
             $this->schemaContainer->hasSchema($resource),
71
-            'No Schema found for resource `' . get_class($resource) . '`.'
71
+            'No Schema found for resource `'.get_class($resource).'`.'
72 72
         );
73 73
 
74 74
         return $this->factory->createParsedResource(
Please login to merge, or discard this patch.
src/Parser/IdentifierAndResource.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@
 block discarded – undo
448 448
      * @param bool     $addSelfLink
449 449
      * @param bool     $addRelatedLink
450 450
      *
451
-     * @return iterable
451
+     * @return \Generator
452 452
      */
453 453
     private function parseLinks(
454 454
         string $relationshipName,
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,15 +177,15 @@  discard block
 block discarded – undo
177 177
         $currentType    = $this->getType();
178 178
         $currentPath    = $this->getPosition()->getPath();
179 179
         $nextLevel      = $this->getPosition()->getLevel() + 1;
180
-        $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath . PositionInterface::PATH_SEPARATOR;
180
+        $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath.PositionInterface::PATH_SEPARATOR;
181 181
         foreach ($this->getSchema()->getRelationships($this->getData()) as $name => $description) {
182 182
             assert(
183 183
                 is_string($name) === true && empty($name) === false,
184
-                "Relationship names for type `" . $currentType .'` should be non-empty strings.'
184
+                "Relationship names for type `".$currentType.'` should be non-empty strings.'
185 185
             );
186 186
             assert(
187 187
                 is_array($description) === true && empty($description) === false,
188
-                "Relationship `$name` for type `" . $currentType . '` should be a non-empty array.'
188
+                "Relationship `$name` for type `".$currentType.'` should be a non-empty array.'
189 189
             );
190 190
 
191 191
             $hasData = array_key_exists(SchemaInterface::RELATIONSHIP_DATA, $description);
@@ -232,13 +232,13 @@  discard block
 block discarded – undo
232 232
             $hasLinks = $addSelfLink === true || $addRelatedLink === true || empty($schemaLinks) === false;
233 233
             assert(
234 234
                 $hasData || $hasMeta || $hasLinks,
235
-                "Relationship `$name` for type `" . $currentType .
235
+                "Relationship `$name` for type `".$currentType.
236 236
                 '` MUST contain at least one of the following: links, data or meta.'
237 237
             );
238 238
 
239 239
             $nextPosition = $this->getFactory()->createPosition(
240 240
                 $nextLevel,
241
-                $nextPathPrefix . $name,
241
+                $nextPathPrefix.$name,
242 242
                 $currentType,
243 243
                 $name
244 244
             );
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -507,7 +507,8 @@  discard block
 block discarded – undo
507 507
             $factory,
508 508
             $schemaContainer,
509 509
             $resource
510
-        ) extends BaseRelationshipData implements RelationshipDataInterface {
510
+        ) extends BaseRelationshipData implements RelationshipDataInterface
511
+        {
511 512
             /**
512 513
              * @var mixed
513 514
              */
@@ -623,7 +624,8 @@  discard block
 block discarded – undo
623 624
             $factory,
624 625
             $schemaContainer,
625 626
             $identifier
626
-        ) extends BaseRelationshipData implements RelationshipDataInterface {
627
+        ) extends BaseRelationshipData implements RelationshipDataInterface
628
+        {
627 629
             /**
628 630
              * @var mixed
629 631
              */
@@ -739,7 +741,8 @@  discard block
 block discarded – undo
739 741
             $factory,
740 742
             $schemaContainer,
741 743
             $resources
742
-        ) extends BaseRelationshipData implements RelationshipDataInterface {
744
+        ) extends BaseRelationshipData implements RelationshipDataInterface
745
+        {
743 746
             /**
744 747
              * @var iterable
745 748
              */
Please login to merge, or discard this patch.
src/Parser/Parser.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      * @see ResourceInterface
204 204
      * @see IdentifierInterface
205 205
      *
206
-     * @return iterable
206
+     * @return \Generator
207 207
      */
208 208
     private function parseAsResourcesOrIdentifiers(
209 209
         PositionInterface $position,
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      *
226 226
      * @see ResourceInterface
227 227
      *
228
-     * @return iterable
228
+     * @return \Generator
229 229
      *
230 230
      */
231 231
     private function parseAsResource(
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     /**
247 247
      * @param ResourceInterface $resource
248 248
      *
249
-     * @return iterable
249
+     * @return \Generator
250 250
      */
251 251
     private function parseResource(ResourceInterface $resource): iterable
252 252
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     /** @var string */
52 52
     public const MSG_CAN_NOT_PARSE_RELATIONSHIP =
53
-        'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either ' .
53
+        'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either '.
54 54
         'has `null` or identifier as data. Skipping.';
55 55
 
56 56
     /**
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             $curPath = '';
547 547
             foreach (explode(DocumentInterface::PATH_SEPARATOR, $path) as $pathPart) {
548 548
                 $curPath = empty($curPath) === true ?
549
-                    $pathPart : $curPath . DocumentInterface::PATH_SEPARATOR . $pathPart;
549
+                    $pathPart : $curPath.DocumentInterface::PATH_SEPARATOR.$pathPart;
550 550
                 $normalizedPaths[$curPath] = true;
551 551
             }
552 552
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,7 +435,8 @@
 block discarded – undo
435 435
             $isNull,
436 436
             $isResource,
437 437
             $isIdentifier
438
-        ) implements DocumentDataInterface {
438
+        ) implements DocumentDataInterface
439
+        {
439 440
             /**
440 441
              * @var PositionInterface
441 442
              */
Please login to merge, or discard this patch.
src/Representation/FieldSetFilter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
      * @param string $type
116 116
      * @param iterable $fields
117 117
      *
118
-     * @return iterable
118
+     * @return \Generator
119 119
      */
120 120
     protected function filterFields(string $type, iterable $fields): iterable
121 121
     {
Please login to merge, or discard this patch.
src/Factories/Factory.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,8 @@
 block discarded – undo
296 296
             $links,
297 297
             $hasMeta,
298 298
             $meta
299
-        ) implements RelationshipInterface {
299
+        ) implements RelationshipInterface
300
+        {
300 301
             /**
301 302
              * @var PositionInterface
302 303
              */
Please login to merge, or discard this patch.