@@ -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 | $accessor1 = $object1; |
112 | 112 | $accessor2 = $object2; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | return $a*1; |
142 | 142 | } |
143 | 143 | $type = $this->resourceProperty->getInstanceType(); |
144 | - $result = null; |
|
144 | + $result = null; |
|
145 | 145 | if ($type instanceof DateTime) { |
146 | 146 | $result = strtotime($accessor1) - strtotime($accessor2); |
147 | 147 | } elseif ($type instanceof StringType) { |
@@ -150,11 +150,11 @@ discard block |
||
150 | 150 | $result = strcmp($accessor1, $accessor2); |
151 | 151 | } else { |
152 | 152 | $delta = $accessor1 - $accessor2; |
153 | - $result = (0 == $delta) ? 0 : $delta / abs($delta); |
|
153 | + $result = (0 == $delta) ? 0 : $delta/abs($delta); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return $a*$result; |
157 | 157 | }; |
158 | - return $retVal ; |
|
158 | + return $retVal; |
|
159 | 159 | } |
160 | 160 | } |
@@ -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 | } |