Test Setup Failed
Pull Request — master (#152)
by Christopher
04:10
created
src/POData/ObjectModel/ODataEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
      * @param \POData\ObjectModel\ODataMediaLink      $mediaLink
222 222
      * @param \POData\ObjectModel\ODataMediaLink|null $editLink
223 223
      */
224
-    private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink &$editLink = null)
224
+    private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink & $editLink = null)
225 225
     {
226 226
         if ('edit-media' == $mediaLink->rel) {
227 227
             $this->isMediaLinkEntry = true;
Please login to merge, or discard this patch.
src/POData/ObjectModel/CynicSerialiser.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $this->isBaseWritten = true;
130 130
 
131 131
         $stackCount = count($this->lightStack);
132
-        $topOfStack = $this->lightStack[$stackCount-1];
132
+        $topOfStack = $this->lightStack[$stackCount - 1];
133 133
         $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack['type']);
134 134
         assert($resourceType instanceof ResourceType, get_class($resourceType));
135 135
         $rawProp = $resourceType->getAllProperties();
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
         $nonRelCount = count($nonRelProp);
152 152
         assert(
153 153
             $rawCount == $relCount + $nonRelCount,
154
-            'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount
155
-            .', and nonRelPropCount,'.$nonRelCount
154
+            'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount
155
+            .', and nonRelPropCount,' . $nonRelCount
156 156
         );
157 157
 
158 158
         // now mask off against projNodes
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'
200 200
             );
201 201
             $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';
202
-            $propType = 'application/atom+xml;type='.$propTail;
202
+            $propType = 'application/atom+xml;type=' . $propTail;
203 203
             $propName = $prop->getName();
204 204
             $nuLink->title = $propName;
205 205
             $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
             $newCount == $stackCount,
237 237
             'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements'
238 238
         );
239
-        $this->lightStack[$newCount-1]['count']--;
240
-        if (0 == $this->lightStack[$newCount-1]['count']) {
239
+        $this->lightStack[$newCount - 1]['count']--;
240
+        if (0 == $this->lightStack[$newCount - 1]['count']) {
241 241
             array_pop($this->lightStack);
242 242
         }
243 243
         return $odata;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      *
251 251
      * @return ODataFeed
252 252
      */
253
-    public function writeTopLevelElements(QueryResult &$entryObjects)
253
+    public function writeTopLevelElements(QueryResult & $entryObjects)
254 254
     {
255 255
         $res = $entryObjects->results;
256 256
         assert(is_array($res) || $res instanceof Collection, '!is_array($entryObjects->results)');
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
      *
377 377
      * @return ODataPropertyContent
378 378
      */
379
-    public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType)
379
+    public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
380 380
     {
381 381
         $result = $complexValue->results;
382 382
 
@@ -404,14 +404,14 @@  discard block
 block discarded – undo
404 404
      *
405 405
      * @return ODataPropertyContent
406 406
      */
407
-    public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType)
407
+    public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType)
408 408
     {
409 409
         $result = $bagValue->results;
410 410
 
411 411
         $propertyContent = new ODataPropertyContent();
412 412
         $odataProperty = new ODataProperty();
413 413
         $odataProperty->name = $propertyName;
414
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
414
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
415 415
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
416 416
 
417 417
         $propertyContent->properties[$propertyName] = $odataProperty;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
      *
427 427
      * @return ODataPropertyContent
428 428
      */
429
-    public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null)
429
+    public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null)
430 430
     {
431 431
         assert(null !== $resourceProperty, 'Resource property must not be null');
432 432
         $result = new ODataPropertyContent();
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
      * @param $result
519 519
      * @return ODataBagContent|null
520 520
      */
521
-    protected function writeBagValue(ResourceType &$resourceType, $result)
521
+    protected function writeBagValue(ResourceType & $resourceType, $result)
522 522
     {
523 523
         assert(null === $result || is_array($result), 'Bag parameter must be null or array');
524 524
         $typeKind = $resourceType->getResourceTypeKind();
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
      * @param  string|null          $propertyName
552 552
      * @return ODataPropertyContent
553 553
      */
554
-    protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null)
554
+    protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null)
555 555
     {
556 556
         assert(is_object($result), 'Supplied $customObject must be an object');
557 557
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
706 706
         assert(null !== $skipToken, '!is_null($skipToken)');
707 707
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
708
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
708
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
709 709
 
710 710
         return $skipToken;
711 711
     }
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
      *
961 961
      * @return string
962 962
      */
963
-    private function primitiveToString(IType &$type, $primitiveValue)
963
+    private function primitiveToString(IType & $type, $primitiveValue)
964 964
     {
965 965
         if ($type instanceof Boolean) {
966 966
             $stringValue = (true === $primitiveValue) ? 'true' : 'false';
@@ -985,6 +985,6 @@  discard block
 block discarded – undo
985 985
         if (28 < $resourceKind) {
986 986
             return false;
987 987
         }
988
-        return 0 == ($resourceKind % 4);
988
+        return 0 == ($resourceKind%4);
989 989
     }
990 990
 }
Please login to merge, or discard this patch.