Test Failed
Push — master ( 125bb1...2a5ec2 )
by Alex
03:17
created
src/Serialisers/IronicSerialiser.php 1 patch
Spacing   +23 added lines, -23 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
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet();
238 238
         $requestTop = $this->getRequest()->getTopOptionCount();
239 239
         $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet);
240
-        $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop;
240
+        $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop;
241 241
 
242 242
         if (true === $entryObjects->hasMore && $requestTop > $pageSize) {
243 243
             $stackSegment = $setName;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
             $segment = $this->getNextLinkUri($lastObject, $absoluteUri);
246 246
             $nextLink = new ODataLink();
247 247
             $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
248
-            $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
248
+            $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
249 249
             $odata->nextPageLink = $nextLink;
250 250
         }
251 251
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $this->getCurrentResourceSetWrapper()->getName()
271 271
             );
272 272
 
273
-            $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
273
+            $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
274 274
         }
275 275
 
276 276
         return $url;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 $segment = $this->getNextLinkUri($lastObject, $this->getRequest()->getRequestUrl()->getUrlAsString());
301 301
                 $nextLink = new ODataLink();
302 302
                 $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
303
-                $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
303
+                $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
304 304
                 $urls->nextPageLink = $nextLink;
305 305
             }
306 306
         }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
      * @return ODataPropertyContent
326 326
      * @codeCoverageIgnore
327 327
      */
328
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
328
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
329 329
     {
330 330
         // TODO: Figure out if we need to bother implementing this
331 331
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      * @codeCoverageIgnore
343 343
      * @return ODataPropertyContent
344 344
      */
345
-    public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType)
345
+    public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)
346 346
     {
347 347
         // TODO: Figure out if we need to bother implementing this
348 348
     }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
      * @codeCoverageIgnore
360 360
      * @return ODataPropertyContent
361 361
      */
362
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
362
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
363 363
     {
364 364
         // TODO: Figure out if we need to bother implementing this
365 365
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         $typeName = $resourceType->getName();
413 413
         $keyProperties = $resourceType->getKeyProperties();
414 414
         assert(count($keyProperties) != 0, 'count($keyProperties) == 0');
415
-        $keyString = $containerName . '(';
415
+        $keyString = $containerName.'(';
416 416
         $comma = null;
417 417
         foreach ($keyProperties as $keyName => $resourceProperty) {
418 418
             $keyType = $resourceProperty->getInstanceType();
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             }
427 427
 
428 428
             $keyValue = $keyType->convertToOData($keyValue);
429
-            $keyString .= $comma . $keyName . '=' . $keyValue;
429
+            $keyString .= $comma.$keyName.'='.$keyValue;
430 430
             $comma = ',';
431 431
         }
432 432
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
         $mediaLink = null;
452 452
         if ($resourceType->isMediaLinkEntry()) {
453 453
             $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context);
454
-            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag);
454
+            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag);
455 455
         }
456 456
         $mediaLinks = [];
457 457
         if ($resourceType->hasNamedStream()) {
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         $segmentWrappers = $this->getStack()->getSegmentWrappers();
593 593
         $count = count($segmentWrappers);
594 594
 
595
-        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1];
595
+        return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1];
596 596
     }
597 597
 
598 598
     /**
@@ -642,22 +642,22 @@  discard block
 block discarded – undo
642 642
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
643 643
             if (!is_null($value)) {
644 644
                 if (!is_null($queryParameterString)) {
645
-                    $queryParameterString = $queryParameterString . '&';
645
+                    $queryParameterString = $queryParameterString.'&';
646 646
                 }
647 647
 
648
-                $queryParameterString .= $queryOption . '=' . $value;
648
+                $queryParameterString .= $queryOption.'='.$value;
649 649
             }
650 650
         }
651 651
 
652 652
         $topCountValue = $this->getRequest()->getTopOptionCount();
653 653
         if (!is_null($topCountValue)) {
654
-            $remainingCount = $topCountValue - $this->getRequest()->getTopCount();
654
+            $remainingCount = $topCountValue-$this->getRequest()->getTopCount();
655 655
             if (0 < $remainingCount) {
656 656
                 if (!is_null($queryParameterString)) {
657 657
                     $queryParameterString .= '&';
658 658
                 }
659 659
 
660
-                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount;
660
+                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount;
661 661
             }
662 662
         }
663 663
 
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
      *
687 687
      * @return string
688 688
      */
689
-    private function primitiveToString(IType &$type, $primitiveValue)
689
+    private function primitiveToString(IType & $type, $primitiveValue)
690 690
     {
691 691
         if ($type instanceof Boolean) {
692 692
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
                 $nuLink->expandedResult->selfLink->title = $propName;
759 759
                 $nuLink->expandedResult->selfLink->url = $nuLink->url;
760 760
                 $nuLink->expandedResult->title = $propName;
761
-                $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url;
761
+                $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url;
762 762
             }
763 763
         }
764 764
     }
@@ -772,6 +772,6 @@  discard block
 block discarded – undo
772 772
     {
773 773
         $this->service = $service;
774 774
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
775
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
775
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
776 776
     }
777 777
 }
Please login to merge, or discard this patch.