@@ -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 | $accessor1 = $object1; |
| 111 | 111 | $accessor2 = $object2; |
| 112 | 112 | $flag1 = is_null($accessor1); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $flag2 |= is_null($accessor2); |
| 122 | 122 | } |
| 123 | 123 | $propertyName = $this->propertyName; |
| 124 | - $getter = 'get'.ucfirst($propertyName); |
|
| 124 | + $getter = 'get' . ucfirst($propertyName); |
|
| 125 | 125 | if (!is_null($accessor1)) { |
| 126 | 126 | $accessor1 = method_exists($accessor1, $getter) ? $accessor1->$getter() : $accessor1->$propertyName; |
| 127 | 127 | } |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | if ($flag1 && $flag2) { |
| 136 | 136 | return 0; |
| 137 | 137 | } elseif ($flag1) { |
| 138 | - return $a * -1; |
|
| 138 | + return $a*-1; |
|
| 139 | 139 | } elseif ($flag2) { |
| 140 | - return $a * 1; |
|
| 140 | + return $a*1; |
|
| 141 | 141 | } |
| 142 | 142 | $type = $this->resourceProperty->getInstanceType(); |
| 143 | 143 | $result = null; |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | $result = strcmp($accessor1, $accessor2); |
| 150 | 150 | } else { |
| 151 | 151 | $delta = $accessor1 - $accessor2; |
| 152 | - $result = (0 == $delta) ? 0 : $delta / abs($delta); |
|
| 152 | + $result = (0 == $delta) ? 0 : $delta/abs($delta); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - return $a * $result; |
|
| 155 | + return $a*$result; |
|
| 156 | 156 | }; |
| 157 | 157 | |
| 158 | 158 | return $retVal; |
@@ -406,7 +406,7 @@ |
||
| 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 | 411 | $ret = $f($object1, $object2); |
| 412 | 412 | if ($ret != 0) { |