Completed
Push — master ( 0aee22...0ba499 )
by Alex
27s queued 15s
created
src/POData/ObjectModel/CynicDeserialiser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,9 +207,9 @@
 block discarded – undo
207 207
             $keyPredicate[strlen($keyPredicate) - 2] = ' ';
208 208
         } else {
209 209
             $idBits = explode('/', $id);
210
-            $keyRaw = $idBits[count($idBits)-1];
210
+            $keyRaw = $idBits[count($idBits) - 1];
211 211
             $rawBits = explode('(', $keyRaw, 2);
212
-            $rawBits = explode(')', $rawBits[count($rawBits)-1]);
212
+            $rawBits = explode(')', $rawBits[count($rawBits) - 1]);
213 213
             $keyPredicate = $rawBits[0];
214 214
         }
215 215
         $keyPredicate = trim($keyPredicate);
Please login to merge, or discard this patch.
POData/UriProcessor/ResourcePathProcessor/SegmentParser/KeyDescriptor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -567,7 +567,7 @@
 block discarded – undo
567 567
         $comma = null;
568 568
         foreach ($keys as $keyName => $resourceProperty) {
569 569
             if (!array_key_exists($keyName, $namedKeys)) {
570
-                $msg = 'Key predicate '.$keyName.' not present in named values';
570
+                $msg = 'Key predicate ' . $keyName . ' not present in named values';
571 571
                 throw new \InvalidArgumentException($msg);
572 572
             }
573 573
             $keyType = $resourceProperty->getInstanceType();
Please login to merge, or discard this patch.
src/POData/ObjectModel/ODataEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         if (null !== $type) {
175 175
             $rawTerm = $type->term;
176 176
             $termArray = explode('.', $rawTerm);
177
-            $final = $termArray[count($termArray)-1];
177
+            $final = $termArray[count($termArray) - 1];
178 178
             $this->resourceSetName = MetadataManager::getResourceSetNameFromResourceType($final);
179 179
         }
180 180
     }
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 = $namespaceName.'.';
27
+        $metaNamespace = $namespaceName . '.';
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/ObjectModel/CynicSerialiser.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $this->service = $service;
104 104
         $this->request = $request;
105 105
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
106
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
106
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
107 107
         $this->stack = new SegmentStack($request);
108 108
         $this->complexTypeInstanceCollection = [];
109 109
         $this->updated = Carbon::now();
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
         $nonRelCount = count($nonRelProp);
154 154
         assert(
155 155
             $rawCount == $relCount + $nonRelCount,
156
-            'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount
157
-            .', and nonRelPropCount,'.$nonRelCount
156
+            'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount
157
+            .', and nonRelPropCount,' . $nonRelCount
158 158
         );
159 159
 
160 160
         // now mask off against projNodes
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $resourceType,
179 179
             $resourceSet->getName()
180 180
         );
181
-        $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
181
+        $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
182 182
 
183 183
         list($mediaLink, $mediaLinks) = $this->writeMediaData(
184 184
             $entryObject->results,
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
             );
203 203
             $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed';
204 204
             $nuLink->isCollection = 'feed' === $propTail;
205
-            $propType = 'application/atom+xml;type='.$propTail;
205
+            $propType = 'application/atom+xml;type=' . $propTail;
206 206
             $propName = $prop->getName();
207 207
             $nuLink->title = $propName;
208
-            $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propName;
209
-            $nuLink->url = $relativeUri.'/'.$propName;
208
+            $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName;
209
+            $nuLink->url = $relativeUri . '/' . $propName;
210 210
             $nuLink->type = $propType;
211 211
 
212 212
             $shouldExpand = $this->shouldExpandSegment($propName);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $newCount = count($this->lightStack);
242 242
         assert(
243 243
             $newCount == $stackCount,
244
-            'Should have '.$stackCount.'elements in stack, have '.$newCount.'elements'
244
+            'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements'
245 245
         );
246 246
         --$this->lightStack[$newCount - 1]['count'];
247 247
         if (0 == $this->lightStack[$newCount - 1]['count']) {
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             $segment = $this->getNextLinkUri($lastObject);
317 317
             $nextLink = new ODataLink();
318 318
             $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
319
-            $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
319
+            $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
320 320
             $odata->nextPageLink = $nextLink;
321 321
         }
322 322
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 $this->getCurrentResourceSetWrapper()->getName()
342 342
             );
343 343
 
344
-            $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri;
344
+            $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri;
345 345
         }
346 346
 
347 347
         return $url;
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                 $segment = $this->getNextLinkUri($lastObject);
378 378
                 $nextLink = new ODataLink();
379 379
                 $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING;
380
-                $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment;
380
+                $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment;
381 381
                 $nextLink->url = ltrim($nextLink->url, '/');
382 382
                 $urls->nextPageLink = $nextLink;
383 383
             }
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         $propertyContent = new ODataPropertyContent();
437 437
         $odataProperty = new ODataProperty();
438 438
         $odataProperty->name = $propertyName;
439
-        $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')';
439
+        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
440 440
         $odataProperty->value = $this->writeBagValue($resourceType, $result);
441 441
 
442 442
         $propertyContent->properties[$propertyName] = $odataProperty;
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
     {
522 522
         $this->service = $service;
523 523
         $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString();
524
-        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/';
524
+        $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/';
525 525
     }
526 526
 
527 527
     /**
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
         $typeName = $resourceType->getName();
672 672
         $keyProperties = $resourceType->getKeyProperties();
673 673
         assert(0 != count($keyProperties), 'count($keyProperties) == 0');
674
-        $keyString = $containerName.'(';
674
+        $keyString = $containerName . '(';
675 675
         $comma = null;
676 676
         foreach ($keyProperties as $keyName => $resourceProperty) {
677 677
             $keyType = $resourceProperty->getInstanceType();
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
             }
685 685
 
686 686
             $keyValue = $keyType->convertToOData($keyValue);
687
-            $keyString .= $comma.$keyName.'='.$keyValue;
687
+            $keyString .= $comma . $keyName . '=' . $keyValue;
688 688
             $comma = ',';
689 689
         }
690 690
 
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
         $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
754 754
         assert(null !== $skipToken, '!is_null($skipToken)');
755 755
         $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
756
-        $skipToken = '?'.$queryParameterString.$token.$skipToken;
756
+        $skipToken = '?' . $queryParameterString . $token . $skipToken;
757 757
 
758 758
         return $skipToken;
759 759
     }
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         $mediaLink = null;
776 776
         if ($resourceType->isMediaLinkEntry()) {
777 777
             $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context);
778
-            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag, 'edit-media');
778
+            $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag, 'edit-media');
779 779
         }
780 780
         $mediaLinks = [];
781 781
         if ($resourceType->hasNamedStream()) {
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
             $nuLink->expandedResult->selfLink->title = $propName;
857 857
             $nuLink->expandedResult->selfLink->url = $nuLink->url;
858 858
             $nuLink->expandedResult->title = new ODataTitle($propName);
859
-            $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url;
859
+            $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url;
860 860
         }
861 861
     }
862 862
 
@@ -937,10 +937,10 @@  discard block
 block discarded – undo
937 937
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
938 938
             if (null !== $value) {
939 939
                 if (null !== $queryParameterString) {
940
-                    $queryParameterString = $queryParameterString.'&';
940
+                    $queryParameterString = $queryParameterString . '&';
941 941
                 }
942 942
 
943
-                $queryParameterString .= $queryOption.'='.$value;
943
+                $queryParameterString .= $queryOption . '=' . $value;
944 944
             }
945 945
         }
946 946
 
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
                     $queryParameterString .= '&';
953 953
                 }
954 954
 
955
-                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount;
955
+                $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount;
956 956
             }
957 957
         }
958 958
 
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
             $nonNull = null !== $result;
985 985
             $subProp = new ODataProperty();
986 986
             $subProp->name = strval($corn);
987
-            $subProp->typeName = $typePrepend.$resource->getFullName().$typeAppend;
987
+            $subProp->typeName = $typePrepend . $resource->getFullName() . $typeAppend;
988 988
 
989 989
             if ($nonNull && is_array($result)) {
990 990
                 $subProp->value = $this->writeBagValue($resource, $result);
@@ -1047,6 +1047,6 @@  discard block
 block discarded – undo
1047 1047
             return false;
1048 1048
         }
1049 1049
 
1050
-        return 0 == ($resourceKind % 4);
1050
+        return 0 == ($resourceKind%4);
1051 1051
     }
1052 1052
 }
Please login to merge, or discard this patch.
src/POData/OperationContext/Web/OutgoingResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function setContentType($value)
95 95
     {
96
-        $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = $value.';charset=UTF-8';
96
+        $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = $value . ';charset=UTF-8';
97 97
     }
98 98
 
99 99
     /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function setStatusCode($value)
166 166
     {
167 167
         $rawCode = substr($value, 0, 3);
168
-        assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is '.$rawCode);
168
+        assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is ' . $rawCode);
169 169
         $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = $value;
170 170
         $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = intval($rawCode);
171 171
     }
Please login to merge, or discard this patch.
src/POData/BatchProcessor/ChangeSetParser.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     protected $changeSetBoundary;
18 18
     protected $rawRequests = [];
19 19
     protected $service;
20
-    protected $contentIDToLocationLookup =[];
20
+    protected $contentIDToLocationLookup = [];
21 21
 
22 22
     /**
23 23
      * ChangeSetParser constructor.
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
             $this->processSubRequest($workingObject);
68 68
             if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) {
69 69
                 if (null === $workingObject->Response->getHeaders()['Location']) {
70
-                    $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb
71
-                           .' request url '.$workingObject->RequestURL;
70
+                    $msg = 'Location header not set in subrequest response for ' . $workingObject->RequestVerb
71
+                           .' request url ' . $workingObject->RequestURL;
72 72
                     throw new \Exception($msg);
73 73
                 }
74 74
                 $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location'];
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
             $response .= 'Content-Type: application/http' . "\r\n";
92 92
             $response .= 'Content-Transfer-Encoding: binary' . "\r\n";
93 93
             $response .= "\r\n";
94
-            $response .= 'HTTP/1.1 '.$headers['Status']."\r\n";
95
-            $response .= 'Content-ID: '.$contentID . "\r\n";
94
+            $response .= 'HTTP/1.1 ' . $headers['Status'] . "\r\n";
95
+            $response .= 'Content-ID: ' . $contentID . "\r\n";
96 96
 
97 97
             foreach ($headers as $headerName => $headerValue) {
98 98
                 if (null !== $headerValue) {
@@ -106,8 +106,7 @@  discard block
 block discarded – undo
106 106
         $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n";
107 107
         $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response;
108 108
         $response = false === $this->changeSetBoundary ?
109
-            $response :
110
-            'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
109
+            $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
111 110
         return $response;
112 111
     }
113 112
 
@@ -164,7 +163,7 @@  discard block
 block discarded – undo
164 163
                         }
165 164
                         $headerSides = explode(':', $line);
166 165
                         if (count($headerSides) != 2) {
167
-                            throw new \Exception('Malformed header line: '.$line);
166
+                            throw new \Exception('Malformed header line: ' . $line);
168 167
                         }
169 168
                         if (strtolower(trim($headerSides[0])) == strtolower('Content-ID')) {
170 169
                             $contentID = trim($headerSides[1]);
@@ -191,7 +190,7 @@  discard block
 block discarded – undo
191 190
             if ($contentIDinit == $contentID) {
192 191
                 $contentIDinit--;
193 192
             }
194
-            $this->rawRequests[$contentID] = (object)[
193
+            $this->rawRequests[$contentID] = (object) [
195 194
                 'RequestVerb' => $requestPathParts[0],
196 195
                 'RequestURL' => $requestPathParts[1],
197 196
                 'ServerParams' => $serverParts,
Please login to merge, or discard this patch.
src/POData/Common/ReflectionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
             $value = $entryObject->$property;
23 23
         } else {
24 24
             if (null === $entryObject) {
25
-                $msg = "Property POData\\Common\\ReflectionHandler::$".$property." does not exist";
25
+                $msg = "Property POData\\Common\\ReflectionHandler::$" . $property . " does not exist";
26 26
                 throw new \ReflectionException($msg);
27 27
             }
28 28
             $reflectionProperty = new \ReflectionProperty(get_class($entryObject), $property);
Please login to merge, or discard this patch.
UriProcessor/QueryProcessor/ExpandProjectionParser/RootProjectionNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
             $stackDex = count($trackStack) - 1;
203 203
             assert(
204 204
                 self::MAX_EXPAND_TREE_DEPTH > $stackDex,
205
-                'Expansion stack too deep - should be less than '. self::MAX_EXPAND_TREE_DEPTH . 'elements'
205
+                'Expansion stack too deep - should be less than ' . self::MAX_EXPAND_TREE_DEPTH . 'elements'
206 206
             );
207 207
             $topNode = $trackStack[$stackDex];
208 208
             /** @var ExpandedProjectionNode $rawNode */
Please login to merge, or discard this patch.