Completed
Push — master ( e31359...face70 )
by Alex
22s
created
src/POData/ObjectModel/ODataEntry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         if (null !== $type) {
174 174
             $rawTerm = $type->term;
175 175
             $termArray = explode('.', $rawTerm);
176
-            $this->resourceSetName = Str::plural($termArray[count($termArray)-1]);
176
+            $this->resourceSetName = Str::plural($termArray[count($termArray) - 1]);
177 177
         }
178 178
     }
179 179
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      * @param \POData\ObjectModel\ODataMediaLink      $mediaLink
239 239
      * @param \POData\ObjectModel\ODataMediaLink|null $editLink
240 240
      */
241
-    private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink &$editLink = null)
241
+    private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink & $editLink = null)
242 242
     {
243 243
         if ('edit-media' == $mediaLink->rel) {
244 244
             $this->isMediaLinkEntry = true;
Please login to merge, or discard this patch.
src/POData/ObjectModel/CynicDeserialiser.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * @param ODataEntry $payload
39 39
      */
40
-    public function processPayload(ODataEntry &$payload)
40
+    public function processPayload(ODataEntry & $payload)
41 41
     {
42 42
         assert($this->isEntryOK($payload));
43 43
         list($sourceSet, $source) = $this->processEntryContent($payload);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         return true;
90 90
     }
91 91
 
92
-    protected function processEntryContent(ODataEntry &$content)
92
+    protected function processEntryContent(ODataEntry & $content)
93 93
     {
94 94
         assert(null === $content->id || is_string($content->id), 'Entry id must be null or string');
95 95
 
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
             $keyPredicate[strlen($keyPredicate) - 2] = ' ';
165 165
         } else {
166 166
             $idBits = explode('/', $id);
167
-            $keyRaw = $idBits[count($idBits)-1];
167
+            $keyRaw = $idBits[count($idBits) - 1];
168 168
             $rawBits = explode('(', $keyRaw, 2);
169
-            $rawBits = explode(')', $rawBits[count($rawBits)-1]);
169
+            $rawBits = explode(')', $rawBits[count($rawBits) - 1]);
170 170
             $keyPredicate = $rawBits[0];
171 171
         }
172 172
         $keyPredicate = trim($keyPredicate);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         return $keyDesc;
179 179
     }
180 180
 
181
-    protected function processLink(ODataLink &$link, ResourceSet $sourceSet, $source)
181
+    protected function processLink(ODataLink & $link, ResourceSet $sourceSet, $source)
182 182
     {
183 183
         $hasUrl = isset($link->url);
184 184
         $hasPayload = isset($link->expandedResult);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      * @param $hasUrl
211 211
      * @param $hasPayload
212 212
      */
213
-    protected function processLinkSingleton(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload)
213
+    protected function processLinkSingleton(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload)
214 214
     {
215 215
         assert(
216 216
             null === $link->expandedResult || $link->expandedResult instanceof ODataEntry,
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         return;
267 267
     }
268 268
 
269
-    protected function processLinkFeed(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload)
269
+    protected function processLinkFeed(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload)
270 270
     {
271 271
         assert(
272 272
             $link->expandedResult instanceof ODataFeed,
Please login to merge, or discard this patch.
src/POData/OperationContext/Web/OutgoingResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 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/Providers/Metadata/SimpleMetadataProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -640,7 +640,7 @@
 block discarded – undo
640 640
         ResourceEntityType $concreteType = null
641 641
     ) {
642 642
         $allowedMult = ['*', '1', '0..1'];
643
-        $backMultArray = [ '*' => '*', '1' => '0..1', '0..1' => '1'];
643
+        $backMultArray = ['*' => '*', '1' => '0..1', '0..1' => '1'];
644 644
         $this->checkInstanceProperty($name, $sourceResourceType);
645 645
 
646 646
         // check that property and resource name don't up and collide - would violate OData spec
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
             $nodes = $topNode['node']->getChildNodes();
Please login to merge, or discard this patch.
POData/UriProcessor/ResourcePathProcessor/SegmentParser/KeyDescriptor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @param  KeyDescriptor|null $keyDescriptor
126 126
      * @return bool
127 127
      */
128
-    protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor &$keyDescriptor = null)
128
+    protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor & $keyDescriptor = null)
129 129
     {
130 130
         $result = self::tryParseKeysFromRawKeyPredicate(
131 131
             $keyString,
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public static function tryParseKeysFromKeyPredicate(
239 239
         $keyPredicate,
240
-        KeyDescriptor &$keyDescriptor = null
240
+        KeyDescriptor & $keyDescriptor = null
241 241
     ) {
242 242
         $isKey = true;
243 243
         $keyString = $keyPredicate;
@@ -567,7 +567,7 @@  discard block
 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/BatchProcessor/BatchProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     public function getResponse()
57 57
     {
58 58
         $response = '';
59
-        $splitter =  '--' . $this->batchBoundary . "\r\n";
59
+        $splitter = '--' . $this->batchBoundary . "\r\n";
60 60
         $raw = $this->changeSetProcessors;
61 61
         foreach ($raw as $contentID => &$workingObject) {
62 62
             $response .= $splitter;
Please login to merge, or discard this patch.
src/POData/Writers/ResponseWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             }
83 83
             $segments = $request->getSegments();
84 84
             $numSeg = count($segments);
85
-            if (1 < $numSeg && '$links' == $segments[$numSeg-2]->getIdentifier()) {
85
+            if (1 < $numSeg && '$links' == $segments[$numSeg - 2]->getIdentifier()) {
86 86
                 if (null !== $entityModel) {
87 87
                     throw new \Exception(Messages::modelPayloadOnLinkModification());
88 88
                 }
Please login to merge, or discard this patch.
src/POData/BatchProcessor/ChangeSetParser.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) {
52 52
                 if (null === $workingObject->Response->getHeaders()['Location']) {
53 53
                     $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb
54
-                           .' request url '.$workingObject->RequestURL;
54
+                            .' request url '.$workingObject->RequestURL;
55 55
                     throw new \Exception($msg);
56 56
                 }
57 57
                 $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location'];
Please login to merge, or discard this patch.
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     protected $changeSetBoundary;
14 14
     protected $rawRequests = [];
15 15
     protected $service;
16
-    protected $contentIDToLocationLookup =[];
16
+    protected $contentIDToLocationLookup = [];
17 17
 
18 18
     public function __construct(BaseService $service, $body)
19 19
     {
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
             $this->processSubRequest($workingObject);
51 51
             if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) {
52 52
                 if (null === $workingObject->Response->getHeaders()['Location']) {
53
-                    $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb
54
-                           .' request url '.$workingObject->RequestURL;
53
+                    $msg = 'Location header not set in subrequest response for ' . $workingObject->RequestVerb
54
+                           .' request url ' . $workingObject->RequestURL;
55 55
                     throw new \Exception($msg);
56 56
                 }
57 57
                 $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location'];
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
             $response .= 'Content-Type: application/http' . "\r\n";
72 72
             $response .= 'Content-Transfer-Encoding: binary' . "\r\n";
73 73
             $response .= "\r\n";
74
-            $response .= 'HTTP/1.1 '.$headers['Status']."\r\n";
75
-            $response .= 'Content-ID: '.$contentID . "\r\n";
74
+            $response .= 'HTTP/1.1 ' . $headers['Status'] . "\r\n";
75
+            $response .= 'Content-ID: ' . $contentID . "\r\n";
76 76
 
77 77
             foreach ($headers as $headerName => $headerValue) {
78 78
                 if (null !== $headerValue) {
@@ -86,8 +86,7 @@  discard block
 block discarded – undo
86 86
         $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n";
87 87
         $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response;
88 88
         $response = false === $this->changeSetBoundary ?
89
-            $response :
90
-            'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
89
+            $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
91 90
         return $response;
92 91
     }
93 92
 
@@ -141,7 +140,7 @@  discard block
 block discarded – undo
141 140
                         }
142 141
                         $headerSides = explode(':', $line);
143 142
                         if (count($headerSides) != 2) {
144
-                            throw new \Exception('Malformed header line: '.$line);
143
+                            throw new \Exception('Malformed header line: ' . $line);
145 144
                         }
146 145
                         if (strtolower(trim($headerSides[0])) == strtolower('Content-ID')) {
147 146
                             $contentID = trim($headerSides[1]);
@@ -168,7 +167,7 @@  discard block
 block discarded – undo
168 167
             if ($contentIDinit == $contentID) {
169 168
                 $contentIDinit--;
170 169
             }
171
-            $this->rawRequests[$contentID] = (object)[
170
+            $this->rawRequests[$contentID] = (object) [
172 171
                 'RequestVerb' => $requestPathParts[0],
173 172
                 'RequestURL' => $requestPathParts[1],
174 173
                 'ServerParams' => $serverParts,
Please login to merge, or discard this patch.