Completed
Pull Request — master (#253)
by
unknown
11:46
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/Schema/ErrorCollection.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     protected function getPathToData(): string
568 568
     {
569
-        return '/' . DocumentInterface::KEYWORD_DATA;
569
+        return '/'.DocumentInterface::KEYWORD_DATA;
570 570
     }
571 571
 
572 572
     /**
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
      */
575 575
     protected function getPathToType(): string
576 576
     {
577
-        return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_TYPE;
577
+        return $this->getPathToData().'/'.DocumentInterface::KEYWORD_TYPE;
578 578
     }
579 579
 
580 580
     /**
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
      */
583 583
     protected function getPathToId(): string
584 584
     {
585
-        return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ID;
585
+        return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ID;
586 586
     }
587 587
 
588 588
     /**
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      */
591 591
     protected function getPathToAttributes(): string
592 592
     {
593
-        return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ATTRIBUTES;
593
+        return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ATTRIBUTES;
594 594
     }
595 595
 
596 596
     /**
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
      */
601 601
     protected function getPathToAttribute(string $name): string
602 602
     {
603
-        return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ATTRIBUTES . '/' . $name;
603
+        return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ATTRIBUTES.'/'.$name;
604 604
     }
605 605
 
606 606
     /**
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
      */
609 609
     protected function getPathToRelationships(): string
610 610
     {
611
-        return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_RELATIONSHIPS;
611
+        return $this->getPathToData().'/'.DocumentInterface::KEYWORD_RELATIONSHIPS;
612 612
     }
613 613
 
614 614
     /**
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      */
619 619
     protected function getPathToRelationship(string $name): string
620 620
     {
621
-        return $this->getPathToRelationships() . '/' . $name;
621
+        return $this->getPathToRelationships().'/'.$name;
622 622
     }
623 623
 
624 624
     /**
@@ -628,8 +628,8 @@  discard block
 block discarded – undo
628 628
      */
629 629
     protected function getPathToRelationshipType(string $name): string
630 630
     {
631
-        return $this->getPathToRelationship($name) . '/' .
632
-            DocumentInterface::KEYWORD_DATA . '/' . DocumentInterface::KEYWORD_TYPE;
631
+        return $this->getPathToRelationship($name).'/'.
632
+            DocumentInterface::KEYWORD_DATA.'/'.DocumentInterface::KEYWORD_TYPE;
633 633
     }
634 634
 
635 635
     /**
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
      */
640 640
     protected function getPathToRelationshipId(string $name): string
641 641
     {
642
-        return $this->getPathToRelationship($name) . '/' .
643
-            DocumentInterface::KEYWORD_DATA . '/' . DocumentInterface::KEYWORD_ID;
642
+        return $this->getPathToRelationship($name).'/'.
643
+            DocumentInterface::KEYWORD_DATA.'/'.DocumentInterface::KEYWORD_ID;
644 644
     }
645 645
 }
Please login to merge, or discard this patch.
src/Parser/RelationshipData/ParseRelationshipDataTrait.php 1 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
         $nextPosition = $factory->createPosition(
70 70
             $nextLevel,
71
-            $nextPathPrefix . $name,
71
+            $nextPathPrefix.$name,
72 72
             $parentType,
73 73
             $name
74 74
         );
Please login to merge, or discard this patch.
src/Parser/RelationshipData/BaseRelationshipData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         \assert(
72 72
             $this->schemaContainer->hasSchema($resource),
73
-            'No Schema found for resource `' . \get_class($resource) . '`.'
73
+            'No Schema found for resource `'.\get_class($resource).'`.'
74 74
         );
75 75
 
76 76
         return $this->factory->createParsedResource(
Please login to merge, or discard this patch.
src/Schema/Link.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,6 @@
 block discarded – undo
106 106
      */
107 107
     protected function buildUrl(string $prefix): string
108 108
     {
109
-        return $this->isSubUrl ? $prefix . $this->value : $this->value;
109
+        return $this->isSubUrl ? $prefix.$this->value : $this->value;
110 110
     }
111 111
 }
Please login to merge, or discard this patch.
src/Schema/BaseSchema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         // Feel free to override this method to change default URL or add meta
76 76
 
77
-        $url = $this->getSelfSubUrl($resource) . '/' . DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $name;
77
+        $url = $this->getSelfSubUrl($resource).'/'.DocumentInterface::KEYWORD_RELATIONSHIPS.'/'.$name;
78 78
 
79 79
         return $this->factory->createLink(true, $url, false);
80 80
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         // Feel free to override this method to change default URL or add meta
88 88
 
89
-        $url = $this->getSelfSubUrl($resource) . '/' . $name;
89
+        $url = $this->getSelfSubUrl($resource).'/'.$name;
90 90
 
91 91
         return $this->factory->createLink(true, $url, false);
92 92
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     protected function getResourcesSubUrl(): string
158 158
     {
159 159
         if ($this->subUrl === null) {
160
-            $this->subUrl = '/' . $this->getType();
160
+            $this->subUrl = '/'.$this->getType();
161 161
         }
162 162
 
163 163
         return $this->subUrl;
@@ -170,6 +170,6 @@  discard block
 block discarded – undo
170 170
      */
171 171
     protected function getSelfSubUrl($resource): string
172 172
     {
173
-        return $this->getResourcesSubUrl() . '/' . $this->getId($resource);
173
+        return $this->getResourcesSubUrl().'/'.$this->getId($resource);
174 174
     }
175 175
 }
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
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     public function getMediaType(): string
100 100
     {
101 101
         if ($this->mediaType === null) {
102
-            $this->mediaType = $this->type . '/' . $this->getSubType();
102
+            $this->mediaType = $this->type.'/'.$this->getSubType();
103 103
         }
104 104
 
105 105
         return $this->mediaType;
Please login to merge, or discard this patch.
src/Representation/DocumentWriter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         if (empty($attributes) === false) {
269 269
             \assert(
270 270
                 \json_encode($attributes) !== false,
271
-                'Attributes for resource type `' . $resource->getType() .
271
+                'Attributes for resource type `'.$resource->getType().
272 272
                 '` cannot be converted into JSON. Please check its Schema returns valid data.'
273 273
             );
274 274
             $representation[DocumentInterface::KEYWORD_ATTRIBUTES] = $attributes;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         if (empty($relationships) === false) {
279 279
             \assert(
280 280
                 \json_encode($relationships) !== false,
281
-                'Relationships for resource type `' . $resource->getType() .
281
+                'Relationships for resource type `'.$resource->getType().
282 282
                 '` cannot be converted into JSON. Please check its Schema returns valid data.'
283 283
             );
284 284
             $representation[DocumentInterface::KEYWORD_RELATIONSHIPS] = $relationships;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             $links = $this->getLinksRepresentation($this->getUrlPrefix(), $resource->getLinks());
289 289
             \assert(
290 290
                 \json_encode($links) !== false,
291
-                'Links for resource type `' . $resource->getType() .
291
+                'Links for resource type `'.$resource->getType().
292 292
                 '` cannot be converted into JSON. Please check its Schema returns valid data.'
293 293
             );
294 294
             $representation[DocumentInterface::KEYWORD_LINKS] = $links;
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             $meta = $resource->getResourceMeta();
299 299
             \assert(
300 300
                 \json_encode($meta) !== false,
301
-                'Meta for resource type `' . $resource->getType() .
301
+                'Meta for resource type `'.$resource->getType().
302 302
                 '` cannot be converted into JSON. Please check its Schema returns valid data.'
303 303
             );
304 304
             $representation[DocumentInterface::KEYWORD_META] = $meta;
Please login to merge, or discard this patch.
src/Parser/Parser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     /** @var string */
51 51
     public const MSG_CAN_NOT_PARSE_RELATIONSHIP =
52
-        'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either ' .
52
+        'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either '.
53 53
         'has `null` or identifier as data. Skipping.';
54 54
 
55 55
     /** @var string */
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
         foreach ($paths as $path) {
447 447
             $curPath = '';
448 448
             foreach (\explode($separator, $path) as $pathPart) {
449
-                $curPath                   = empty($curPath) === true ? $pathPart : $curPath . $separator . $pathPart;
449
+                $curPath                   = empty($curPath) === true ? $pathPart : $curPath.$separator.$pathPart;
450 450
                 $normalizedPaths[$curPath] = true;
451 451
             }
452 452
         }
Please login to merge, or discard this patch.