Completed
Pull Request — master (#47)
by Christopher
06:26 queued 01:38
created
src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByLeafNode.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      *
92 92
      * @param string[] $ancestors Array of parent properties e.g. array('Orders', 'Customer', 'Customer_Demographics')
93 93
      *
94
-     * @return AnonymousFunction
94
+     * @return \Closure
95 95
      */
96 96
     public function buildComparisonFunction($ancestors)
97 97
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $accessor2 = null;
107 107
         $a = $this->_isAscending ? 1 : -1;
108 108
 
109
-        $retVal = function ($object1, $object2) use ($ancestors, $a) {
109
+        $retVal = function($object1, $object2) use ($ancestors, $a) {
110 110
 
111 111
             $flag1 = is_null($object1);
112 112
             $flag2 = is_null($object2);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                 return $a*1;
146 146
             }
147 147
             $type = $this->resourceProperty->getInstanceType();
148
-            $result  = null;
148
+            $result = null;
149 149
             if ($type instanceof DateTime) {
150 150
                 $result = strtotime($accessor1) - strtotime($accessor2);
151 151
             } elseif ($type instanceof StringType) {
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
                 $result = strcmp($accessor1, $accessor2);
155 155
             } else {
156 156
                 $delta = $accessor1 - $accessor2;
157
-                $result = (0 == $delta) ? 0 : $delta / abs($delta);
157
+                $result = (0 == $delta) ? 0 : $delta/abs($delta);
158 158
             }
159 159
 
160 160
             return $a*$result;
161 161
         };
162
-        return $retVal ;
162
+        return $retVal;
163 163
     }
164 164
 }
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -406,9 +406,9 @@
 block discarded – undo
406 406
         } else {
407 407
             $code = null;
408 408
             $funcList = $this->_comparisonFunctions;
409
-            $BigFunc = function ($object1, $object2) use ($funcList) {
409
+            $BigFunc = function($object1, $object2) use ($funcList) {
410 410
                 foreach ($funcList as $f) {
411
-                    $ret = $f($object1,$object2);
411
+                    $ret = $f($object1, $object2);
412 412
                     if ($ret != 0) {
413 413
                         return $ret;
414 414
                     }
Please login to merge, or discard this patch.