Completed
Pull Request — master (#63)
by Christopher
16:31
created
src/POData/UriProcessor/QueryProcessor/SkipTokenParser/SkipTokenParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      * @return InternalSkipTokenInfo
42 42
      */
43 43
     public static function parseSkipTokenClause(
44
-        ResourceType &$resourceType,
45
-        InternalOrderByInfo &$internalOrderByInfo,
44
+        ResourceType & $resourceType,
45
+        InternalOrderByInfo & $internalOrderByInfo,
46 46
         $skipToken
47 47
     ) {
48 48
         $tokenValueDescriptor = null;
Please login to merge, or discard this patch.
QueryProcessor/ExpandProjectionParser/ExpandProjectionParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
                     //assert(!empty($keys))
231 231
                     $orderBy = null;
232 232
                     foreach ($keys as $key) {
233
-                        $orderBy = $orderBy.$key.', ';
233
+                        $orderBy = $orderBy . $key . ', ';
234 234
                     }
235 235
 
236 236
                     $orderBy = rtrim($orderBy, ', ');
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/QueryProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,11 +208,11 @@
 block discarded – undo
208 208
          *
209 209
          */
210 210
         if (!is_null($this->request->getSkipCount()) || !is_null($this->request->getTopCount())) {
211
-            $orderBy = !is_null($orderBy) ? $orderBy.', ' : null;
211
+            $orderBy = !is_null($orderBy) ? $orderBy . ', ' : null;
212 212
             $keys = array_keys($targetResourceType->getKeyProperties());
213 213
             //assert(!empty($keys))
214 214
             foreach ($keys as $key) {
215
-                $orderBy = $orderBy.$key.', ';
215
+                $orderBy = $orderBy . $key . ', ';
216 216
             }
217 217
 
218 218
             $orderBy = rtrim($orderBy, ', ');
Please login to merge, or discard this patch.
POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionParser2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -516,7 +516,7 @@
 block discarded – undo
516 516
             $parent = $nullCheckExpTree;
517 517
             $key = null;
518 518
             do {
519
-                $key = $parent->getResourceProperty()->getName().'_'.$key;
519
+                $key = $parent->getResourceProperty()->getName() . '_' . $key;
520 520
                 $parent = $parent->getParent();
521 521
             } while ($parent != null);
522 522
 
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     {
84 84
         if ($this->Id != ExpressionTokenId::IDENTIFIER) {
85 85
             throw ODataException::createSyntaxError(
86
-                'Identifier expected at position '.$this->Position
86
+                'Identifier expected at position ' . $this->Position
87 87
             );
88 88
         }
89 89
 
Please login to merge, or discard this patch.
POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
                 && (ExpressionLexer::isNumeric($this->_getCurrentToken()->Id))
311 311
             ) {
312 312
                 $numberLiteral = $this->_getCurrentToken();
313
-                $numberLiteral->Text = '-'.$numberLiteral->Text;
313
+                $numberLiteral->Text = '-' . $numberLiteral->Text;
314 314
                 $numberLiteral->Position = $op->Position;
315 315
                 $v = $this->_getCurrentToken();
316 316
                 $this->_setCurrentToken($numberLiteral);
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/ExpressionParser/ExpressionLexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@
 block discarded – undo
345 345
         while ($this->_token->Id == ExpressionTokenId::DOT) {
346 346
             $this->nextToken();
347 347
             $this->validateToken(ExpressionTokenId::IDENTIFIER);
348
-            $identifier = $identifier.'.'.$this->_token->Text;
348
+            $identifier = $identifier . '.' . $this->_token->Text;
349 349
             $this->nextToken();
350 350
         }
351 351
 
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByLeafNode.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $a = $this->_isAscending ? 1 : -1;
104 104
 
105
-        $retVal = function ($object1, $object2) use ($ancestors, $a) {
105
+        $retVal = function($object1, $object2) use ($ancestors, $a) {
106 106
             $accessor1 = $object1;
107 107
             $accessor2 = $object2;
108 108
             $flag1 = is_null($accessor1);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 $flag2 |= is_null($accessor2);
118 118
             }
119 119
             $propertyName = $this->propertyName;
120
-            $getter = 'get'.ucfirst($propertyName);
120
+            $getter = 'get' . ucfirst($propertyName);
121 121
             if (!is_null($accessor1)) {
122 122
                 $accessor1 = method_exists($accessor1, $getter) ? $accessor1->$getter() : $accessor1->$propertyName;
123 123
             }
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
             if ($flag1 && $flag2) {
132 132
                 return 0;
133 133
             } elseif ($flag1) {
134
-                return $a * -1;
134
+                return $a*-1;
135 135
             } elseif ($flag2) {
136
-                return $a * 1;
136
+                return $a*1;
137 137
             }
138 138
             $type = $this->resourceProperty->getInstanceType();
139 139
             if ($type instanceof DateTime) {
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
                 $result = strcmp($accessor1, $accessor2);
145 145
             } else {
146 146
                 $delta = $accessor1 - $accessor2;
147
-                $result = (0 == $delta) ? 0 : $delta / abs($delta);
147
+                $result = (0 == $delta) ? 0 : $delta/abs($delta);
148 148
             }
149 149
 
150
-            return $a * $result;
150
+            return $a*$result;
151 151
         };
152 152
 
153 153
         return $retVal;
Please login to merge, or discard this patch.
POData/UriProcessor/QueryProcessor/OrderByParser/InternalOrderByInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
                         // Also we can think about moving above urlencode to this
182 182
                         // function
183 183
                         $value = $type->convertToOData($currentObject);
184
-                        $nextPageLink .= $value.', ';
184
+                        $nextPageLink .= $value . ', ';
185 185
                     }
186 186
                 } catch (\ReflectionException $reflectionException) {
187 187
                     throw ODataException::createInternalServerError(
Please login to merge, or discard this patch.