Test Setup Failed
Push — master ( a7c84c...018894 )
by Alex
05:17
created
src/POData/ObjectModel/CynicSerialiser.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $this->isBaseWritten = true;
129 129
 
130 130
         $stackCount = count($this->lightStack);
131
-        $topOfStack = $this->lightStack[$stackCount-1];
131
+        $topOfStack = $this->lightStack[$stackCount - 1];
132 132
         $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack[0]);
133 133
         assert($resourceType instanceof ResourceType, get_class($resourceType));
134 134
         $rawProp = $resourceType->getAllProperties();
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
         $nonRelCount = count($nonRelProp);
151 151
         assert(
152 152
             $rawCount == $relCount + $nonRelCount,
153
-            'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount
154
-            .', and nonRelPropCount,'.$nonRelCount
153
+            'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount
154
+            .', and nonRelPropCount,' . $nonRelCount
155 155
         );
156 156
 
157 157
         // now mask off against projNodes
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'
199 199
             );
200 200
             $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';
201
-            $propType = 'application/atom+xml;type='.$propTail;
201
+            $propType = 'application/atom+xml;type=' . $propTail;
202 202
             $propName = $prop->getName();
203 203
             $nuLink->title = $propName;
204 204
             $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
      *
247 247
      * @return ODataFeed
248 248
      */
249
-    public function writeTopLevelElements(QueryResult &$entryObjects)
249
+    public function writeTopLevelElements(QueryResult & $entryObjects)
250 250
     {
251 251
         assert(is_array($entryObjects->results), '!is_array($entryObjects->results)');
252 252
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      *
372 372
      * @return ODataPropertyContent
373 373
      */
374
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
374
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
375 375
     {
376 376
         $result = $complexValue->results;
377 377
 
@@ -399,14 +399,14 @@  discard block
 block discarded – undo
399 399
      *
400 400
      * @return ODataPropertyContent
401 401
      */
402
-    public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType)
402
+    public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType)
403 403
     {
404 404
         $result = $bagValue->results;
405 405
 
406 406
         $propertyContent = new ODataPropertyContent();
407 407
         $odataProperty = new ODataProperty();
408 408
         $odataProperty->name = $propertyName;
409
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
409
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
410 410
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
411 411
 
412 412
         $propertyContent->properties[$propertyName] = $odataProperty;
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
      *
422 422
      * @return ODataPropertyContent
423 423
      */
424
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
424
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
425 425
     {
426 426
         assert(null !== $resourceProperty, 'Resource property must not be null');
427 427
         $result = new ODataPropertyContent();
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
      * @param $result
514 514
      * @return ODataBagContent|null
515 515
      */
516
-    protected function writeBagValue(ResourceType &$resourceType, $result)
516
+    protected function writeBagValue(ResourceType & $resourceType, $result)
517 517
     {
518 518
         assert(null === $result || is_array($result), 'Bag parameter must be null or array');
519 519
         $typeKind = $resourceType->getResourceTypeKind();
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
      * @param  string|null          $propertyName
547 547
      * @return ODataPropertyContent
548 548
      */
549
-    protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)
549
+    protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)
550 550
     {
551 551
         assert(is_object($result), 'Supplied $customObject must be an object');
552 552
 
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
701 701
         assert(null !== $skipToken, '!is_null($skipToken)');
702 702
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
703
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
703
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
704 704
 
705 705
         return $skipToken;
706 706
     }
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
      *
951 951
      * @return string
952 952
      */
953
-    private function primitiveToString(IType &$type, $primitiveValue)
953
+    private function primitiveToString(IType & $type, $primitiveValue)
954 954
     {
955 955
         if ($type instanceof Boolean) {
956 956
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -975,6 +975,6 @@  discard block
 block discarded – undo
975 975
         if (28 < $resourceKind) {
976 976
             return false;
977 977
         }
978
-        return 0 == ($resourceKind % 4);
978
+        return 0 == ($resourceKind%4);
979 979
     }
980 980
 }
Please login to merge, or discard this patch.