Test Failed
Push — master ( 29e5ca...125bb1 )
by Alex
03:42
created
src/Serialisers/IronicSerialiser.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->service = $service;
97 97
         $this->request = $request;
98 98
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
99
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
99
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
100 100
         $this->stack = new SegmentStack($request);
101 101
         $this->complexTypeInstanceCollection = [];
102 102
         $this->modelSerialiser = new ModelSerialiser();
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $resourceType,
143 143
             $resourceSet->getName()
144 144
         );
145
-        $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
145
+        $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
146 146
 
147 147
         list($mediaLink, $mediaLinks) = $this->writeMediaData($entryObject->results, $type, $relativeUri, $resourceType);
148 148
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
             $propType = 'application/atom+xml;type='.$propTail;
164 164
             $propName = $prop->getName();
165 165
             $nuLink->title = $propName;
166
-            $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
167
-            $nuLink->url = $relativeUri . '/' . $propName;
166
+            $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propName;
167
+            $nuLink->url = $relativeUri.'/'.$propName;
168 168
             $nuLink->type = $propType;
169 169
 
170 170
             $navProp = new ODataNavigationPropertyInfo($prop, $this->shouldExpandSegment($propName));
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      *
201 201
      * @return ODataFeed
202 202
      */
203
-    public function writeTopLevelElements(QueryResult &$entryObjects)
203
+    public function writeTopLevelElements(QueryResult & $entryObjects)
204 204
     {
205 205
         assert(is_array($entryObjects->results), '!is_array($entryObjects->results)');
206 206
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $segment = $this->getNextLinkUri($lastObject, $absoluteUri);
241 241
             $nextLink = new ODataLink();
242 242
             $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
243
-            $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
243
+            $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
244 244
             $odata->nextPageLink = $nextLink;
245 245
         }
246 246
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                 $this->getCurrentResourceSetWrapper()->getName()
266 266
             );
267 267
 
268
-            $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
268
+            $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
269 269
         }
270 270
 
271 271
         return $url;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                 $segment = $this->getNextLinkUri($lastObject, $this->getRequest()->getRequestUrl()->getUrlAsString());
296 296
                 $nextLink = new ODataLink();
297 297
                 $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
298
-                $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
298
+                $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
299 299
                 $urls->nextPageLink = $nextLink;
300 300
             }
301 301
         }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      * @return ODataPropertyContent
321 321
      * @codeCoverageIgnore
322 322
      */
323
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
323
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
324 324
     {
325 325
         // TODO: Figure out if we need to bother implementing this
326 326
     }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      * @codeCoverageIgnore
338 338
      * @return ODataPropertyContent
339 339
      */
340
-    public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType)
340
+    public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)
341 341
     {
342 342
         // TODO: Figure out if we need to bother implementing this
343 343
     }
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      * @codeCoverageIgnore
355 355
      * @return ODataPropertyContent
356 356
      */
357
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
357
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
358 358
     {
359 359
         // TODO: Figure out if we need to bother implementing this
360 360
     }
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         $typeName = $resourceType->getName();
408 408
         $keyProperties = $resourceType->getKeyProperties();
409 409
         assert(count($keyProperties) != 0, 'count($keyProperties) == 0');
410
-        $keyString = $containerName . '(';
410
+        $keyString = $containerName.'(';
411 411
         $comma = null;
412 412
         foreach ($keyProperties as $keyName => $resourceProperty) {
413 413
             $keyType = $resourceProperty->getInstanceType();
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
             }
422 422
 
423 423
             $keyValue = $keyType->convertToOData($keyValue);
424
-            $keyString .= $comma . $keyName . '=' . $keyValue;
424
+            $keyString .= $comma.$keyName.'='.$keyValue;
425 425
             $comma = ',';
426 426
         }
427 427
 
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
         $mediaLink = null;
447 447
         if ($resourceType->isMediaLinkEntry()) {
448 448
             $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context);
449
-            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag);
449
+            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag);
450 450
         }
451 451
         $mediaLinks = [];
452 452
         if ($resourceType->hasNamedStream()) {
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
         $segmentWrappers = $this->getStack()->getSegmentWrappers();
588 588
         $count = count($segmentWrappers);
589 589
 
590
-        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1];
590
+        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1];
591 591
     }
592 592
 
593 593
     /**
@@ -637,22 +637,22 @@  discard block
 block discarded – undo
637 637
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
638 638
             if (!is_null($value)) {
639 639
                 if (!is_null($queryParameterString)) {
640
-                    $queryParameterString = $queryParameterString . '&';
640
+                    $queryParameterString = $queryParameterString.'&';
641 641
                 }
642 642
 
643
-                $queryParameterString .= $queryOption . '=' . $value;
643
+                $queryParameterString .= $queryOption.'='.$value;
644 644
             }
645 645
         }
646 646
 
647 647
         $topCountValue = $this->getRequest()->getTopOptionCount();
648 648
         if (!is_null($topCountValue)) {
649
-            $remainingCount = $topCountValue - $this->getRequest()->getTopCount();
649
+            $remainingCount = $topCountValue-$this->getRequest()->getTopCount();
650 650
             if (0 < $remainingCount) {
651 651
                 if (!is_null($queryParameterString)) {
652 652
                     $queryParameterString .= '&';
653 653
                 }
654 654
 
655
-                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount;
655
+                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount;
656 656
             }
657 657
         }
658 658
 
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
      *
682 682
      * @return string
683 683
      */
684
-    private function primitiveToString(IType &$type, $primitiveValue)
684
+    private function primitiveToString(IType & $type, $primitiveValue)
685 685
     {
686 686
         if ($type instanceof Boolean) {
687 687
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
                 $nuLink->expandedResult->selfLink->title = $propName;
754 754
                 $nuLink->expandedResult->selfLink->url = $nuLink->url;
755 755
                 $nuLink->expandedResult->title = $propName;
756
-                $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url;
756
+                $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url;
757 757
             }
758 758
         }
759 759
     }
@@ -767,6 +767,6 @@  discard block
 block discarded – undo
767 767
     {
768 768
         $this->service = $service;
769 769
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
770
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
770
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
771 771
     }
772 772
 }
Please login to merge, or discard this patch.