Completed
Push — master ( 8877af...028b89 )
by Christopher
15s
created
src/POData/Common/Messages/orderByInfo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public static function orderByParserPropertyNotFound($resourceTypeName, $propertyName)
51 51
     {
52 52
         return 'Error in the \'orderby\' clause. Type ' . $resourceTypeName
53
-               . ' does not have a property named \'' . $propertyName . '\'.';
53
+                . ' does not have a property named \'' . $propertyName . '\'.';
54 54
     }
55 55
 
56 56
     /**
@@ -179,6 +179,6 @@  discard block
 block discarded – undo
179 179
     public static function orderByParserFailedToAccessOrInitializeProperty($propertyName, $parentObjectName)
180 180
     {
181 181
         return 'OrderBy parser failed to access or initialize the property ' . $propertyName .
182
-               ' of ' . $parentObjectName;
182
+                ' of ' . $parentObjectName;
183 183
     }
184 184
 }
Please login to merge, or discard this patch.
src/POData/UriProcessor/RequestExpander.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      *
195 195
      * @return bool true if a segment was pushed, false otherwise
196 196
      */
197
-    private function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty)
197
+    private function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty)
198 198
     {
199 199
         if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY()) {
200 200
             assert(!empty($this->getStack()->getSegmentNames()), '!is_empty($this->getStack()->getSegmentNames())');
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      *
280 280
      * @return bool true if the segment was push, false otherwise
281 281
      */
282
-    private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper)
282
+    private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper)
283 283
     {
284 284
         return $this->getStack()->pushSegment($segmentName, $resourceSetWrapper);
285 285
     }
Please login to merge, or discard this patch.
src/POData/OperationContext/ServiceHost.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                     );
223 223
                 }
224 224
 
225
-                $builtServiceUri = $requestUriScheme .'://' . $this->getAbsoluteRequestUri()->getHost();
225
+                $builtServiceUri = $requestUriScheme . '://' . $this->getAbsoluteRequestUri()->getHost();
226 226
 
227 227
                 if (($requestUriScheme == 'http' && $requestUriPort != '80') ||
228 228
                     ($requestUriScheme == 'https' && $requestUriPort != '443')
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
             $this->getOperationContext()->outgoingResponse()->setContentLength($value);
512 512
         } else {
513 513
             throw ODataException::notAcceptableError(
514
-                'ContentLength: '.$value.' is invalid'
514
+                'ContentLength: ' . $value . ' is invalid'
515 515
             );
516 516
         }
517 517
     }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
     public function setResponseStatusCode($value)
557 557
     {
558 558
         if (!is_numeric($value)) {
559
-            $msg = 'Invalid, non-numeric, status code: '.$value;
559
+            $msg = 'Invalid, non-numeric, status code: ' . $value;
560 560
             throw ODataException::createInternalServerError($msg);
561 561
         }
562 562
         $floor = floor($value/100);
Please login to merge, or discard this patch.
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   +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.
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.
src/POData/Providers/Metadata/ResourceEntityType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             $namespaceName = implode('.', $bitz);
25 25
         }
26 26
         $rawType = $entity->getBaseType();
27
-        $metaNamespace = $meta->getContainerNamespace().'.';
27
+        $metaNamespace = $meta->getContainerNamespace() . '.';
28 28
 
29 29
         $rawType = (null !== $rawType) ? str_replace($metaNamespace, '', $rawType) : null;
30 30
         $baseType = null === $rawType ? null : $meta->resolveResourceType($rawType);
Please login to merge, or discard this patch.
src/POData/Providers/ProvidersQueryWrapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -423,8 +423,8 @@
 block discarded – undo
423 423
      */
424 424
     protected function validateEntityInstance(
425 425
         $entityInstance,
426
-        ResourceSet &$resourceSet,
427
-        KeyDescriptor &$keyDescriptor,
426
+        ResourceSet & $resourceSet,
427
+        KeyDescriptor & $keyDescriptor,
428 428
         $methodName
429 429
     ) {
430 430
         if (null === $entityInstance) {
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataMediaLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
         $this->eTag = $eTag;
77 77
         $this->name = $name;
78 78
         $this->srcLink = $srcLink;
79
-        $this->rel = (null !== $rel) ? $rel : self::MEDIARESOURCE_BASE.$name;
79
+        $this->rel = (null !== $rel) ? $rel : self::MEDIARESOURCE_BASE . $name;
80 80
     }
81 81
 }
Please login to merge, or discard this patch.