Test Setup Failed
Pull Request — master (#136)
by Alex
03:53
created
src/POData/ObjectModel/CynicSerialiser.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -565,10 +565,10 @@
 block discarded – undo
565 565
     {
566 566
         $queryParameterString = null;
567 567
         foreach ([ODataConstants::HTTPQUERY_STRING_FILTER,
568
-                     ODataConstants::HTTPQUERY_STRING_EXPAND,
569
-                     ODataConstants::HTTPQUERY_STRING_ORDERBY,
570
-                     ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
571
-                     ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) {
568
+                        ODataConstants::HTTPQUERY_STRING_EXPAND,
569
+                        ODataConstants::HTTPQUERY_STRING_ORDERBY,
570
+                        ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
571
+                        ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) {
572 572
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
573 573
             if (null !== $value) {
574 574
                 if (null !== $queryParameterString) {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      *
105 105
      * @return ODataFeed
106 106
      */
107
-    public function writeTopLevelElements(QueryResult &$entryObjects)
107
+    public function writeTopLevelElements(QueryResult & $entryObjects)
108 108
     {
109 109
         // TODO: Implement writeTopLevelElements() method.
110 110
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return ODataPropertyContent
180 180
      */
181
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
181
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
182 182
     {
183 183
         $result = $complexValue->results;
184 184
 
@@ -206,14 +206,14 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @return ODataPropertyContent
208 208
      */
209
-    public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType)
209
+    public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType)
210 210
     {
211 211
         $result = $bagValue->results;
212 212
 
213 213
         $propertyContent = new ODataPropertyContent();
214 214
         $odataProperty = new ODataProperty();
215 215
         $odataProperty->name = $propertyName;
216
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
216
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
217 217
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
218 218
 
219 219
         $propertyContent->properties[] = $odataProperty;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @return ODataPropertyContent
230 230
      */
231
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
231
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
232 232
     {
233 233
         assert(null !== $resourceProperty, 'Resource property must not be null');
234 234
         $result = new ODataPropertyContent();
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      * @param $result
311 311
      * @return ODataBagContent|null
312 312
      */
313
-    protected function writeBagValue(ResourceType &$resourceType, $result)
313
+    protected function writeBagValue(ResourceType & $resourceType, $result)
314 314
     {
315 315
         assert(null === $result || is_array($result), 'Bag parameter must be null or array');
316 316
         $typeKind = $resourceType->getResourceTypeKind();
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      * @param string|null   $propertyName
344 344
      * @return ODataPropertyContent
345 345
      */
346
-    protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)
346
+    protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)
347 347
     {
348 348
         assert(is_object($result), 'Supplied $customObject must be an object');
349 349
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
493 493
         assert(!is_null($skipToken), '!is_null($skipToken)');
494 494
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
495
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
495
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
496 496
 
497 497
         return $skipToken;
498 498
     }
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
      *
609 609
      * @return string
610 610
      */
611
-    private function primitiveToString(IType &$type, $primitiveValue)
611
+    private function primitiveToString(IType & $type, $primitiveValue)
612 612
     {
613 613
         if ($type instanceof Boolean) {
614 614
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -633,6 +633,6 @@  discard block
 block discarded – undo
633 633
         if (28 < $resourceKind) {
634 634
             return false;
635 635
         }
636
-        return 0 == ($resourceKind % 4);
636
+        return 0 == ($resourceKind%4);
637 637
     }
638 638
 }
Please login to merge, or discard this patch.