Test Setup Failed
Pull Request — master (#140)
by Alex
04:30
created
src/POData/ObjectModel/CynicSerialiser.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->loadStackIfEmpty();
112 112
 
113 113
         $stackCount = count($this->lightStack);
114
-        $topOfStack = $this->lightStack[$stackCount-1];
114
+        $topOfStack = $this->lightStack[$stackCount - 1];
115 115
         $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack[0]);
116 116
         assert($resourceType instanceof ResourceType, get_class($resourceType));
117 117
         $rawProp = $resourceType->getAllProperties();
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
         $nonRelCount = count($nonRelProp);
134 134
         assert(
135 135
             $rawCount == $relCount + $nonRelCount,
136
-            'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount
137
-            .', and nonRelPropCount,'.$nonRelCount
136
+            'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount
137
+            .', and nonRelPropCount,' . $nonRelCount
138 138
         );
139 139
 
140 140
         // now mask off against projNodes
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'
182 182
             );
183 183
             $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';
184
-            $propType = 'application/atom+xml;type='.$propTail;
184
+            $propType = 'application/atom+xml;type=' . $propTail;
185 185
             $propName = $prop->getName();
186 186
             $nuLink->title = $propName;
187 187
             $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      *
225 225
      * @return ODataFeed
226 226
      */
227
-    public function writeTopLevelElements(QueryResult &$entryObjects)
227
+    public function writeTopLevelElements(QueryResult & $entryObjects)
228 228
     {
229 229
         assert(is_array($entryObjects->results), '!is_array($entryObjects->results)');
230 230
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      *
347 347
      * @return ODataPropertyContent
348 348
      */
349
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
349
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
350 350
     {
351 351
         $result = $complexValue->results;
352 352
 
@@ -374,14 +374,14 @@  discard block
 block discarded – undo
374 374
      *
375 375
      * @return ODataPropertyContent
376 376
      */
377
-    public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType)
377
+    public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType)
378 378
     {
379 379
         $result = $bagValue->results;
380 380
 
381 381
         $propertyContent = new ODataPropertyContent();
382 382
         $odataProperty = new ODataProperty();
383 383
         $odataProperty->name = $propertyName;
384
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
384
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
385 385
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
386 386
 
387 387
         $propertyContent->properties[] = $odataProperty;
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      *
397 397
      * @return ODataPropertyContent
398 398
      */
399
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
399
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
400 400
     {
401 401
         assert(null !== $resourceProperty, 'Resource property must not be null');
402 402
         $result = new ODataPropertyContent();
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
      * @param $result
479 479
      * @return ODataBagContent|null
480 480
      */
481
-    protected function writeBagValue(ResourceType &$resourceType, $result)
481
+    protected function writeBagValue(ResourceType & $resourceType, $result)
482 482
     {
483 483
         assert(null === $result || is_array($result), 'Bag parameter must be null or array');
484 484
         $typeKind = $resourceType->getResourceTypeKind();
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
      * @param  string|null          $propertyName
512 512
      * @return ODataPropertyContent
513 513
      */
514
-    protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)
514
+    protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)
515 515
     {
516 516
         assert(is_object($result), 'Supplied $customObject must be an object');
517 517
 
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
666 666
         assert(null !== $skipToken, '!is_null($skipToken)');
667 667
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
668
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
668
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
669 669
 
670 670
         return $skipToken;
671 671
     }
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
      *
916 916
      * @return string
917 917
      */
918
-    private function primitiveToString(IType &$type, $primitiveValue)
918
+    private function primitiveToString(IType & $type, $primitiveValue)
919 919
     {
920 920
         if ($type instanceof Boolean) {
921 921
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -940,6 +940,6 @@  discard block
 block discarded – undo
940 940
         if (28 < $resourceKind) {
941 941
             return false;
942 942
         }
943
-        return 0 == ($resourceKind % 4);
943
+        return 0 == ($resourceKind%4);
944 944
     }
945 945
 }
Please login to merge, or discard this patch.
src/POData/UriProcessor/SegmentStack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      * @throws InvalidOperationException
51 51
      * @return bool                      true if the segment was push, false otherwise
52 52
      */
53
-    public function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
53
+    public function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper)
54 54
     {
55 55
         if (!is_string($segmentName)) {
56 56
             throw new InvalidOperationException('segmentName must be a string');
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
      */
682 682
     protected function compareETag(
683 683
         &$entryObject,
684
-        ResourceType &$resourceType,
684
+        ResourceType & $resourceType,
685 685
         &$needToSerializeResponse
686 686
     ) {
687 687
         $needToSerializeResponse = true;
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
      *                        for use in a URI) there are etag properties, NULL if
776 776
      *                        there is no etag property
777 777
      */
778
-    protected function getETagForEntry(&$entryObject, ResourceType &$resourceType)
778
+    protected function getETagForEntry(&$entryObject, ResourceType & $resourceType)
779 779
     {
780 780
         $eTag = null;
781 781
         $comma = null;
Please login to merge, or discard this patch.