Completed
Pull Request — master (#47)
by Christopher
05:39
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);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 return $a*1;
143 143
             }
144 144
             $type = $this->resourceProperty->getInstanceType();
145
-            $result  = null;
145
+            $result = null;
146 146
             if ($type instanceof DateTime) {
147 147
                 $result = strtotime($accessor1) - strtotime($accessor2);
148 148
             } elseif ($type instanceof StringType) {
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
                 $result = strcmp($accessor1, $accessor2);
152 152
             } else {
153 153
                 $delta = $accessor1 - $accessor2;  
154
-                $result (0 == $delta) ? 0 : $delta / abs($delta);
154
+                $result(0 == $delta) ? 0 : $delta/abs($delta);
155 155
             }
156 156
 
157 157
             return $a*$result;
158 158
         };
159
-        return $retVal ;
159
+        return $retVal;
160 160
     }
161 161
 }
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.