@@ -91,7 +91,7 @@ |
||
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 | { |
@@ -106,7 +106,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -406,9 +406,9 @@ |
||
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 | } |