@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | private static function sort($results, $sortingArray) |
| 45 | 45 | { |
| 46 | - usort($results, function ($first, $second) use ($sortingArray) { |
|
| 46 | + usort($results, function($first, $second) use ($sortingArray) { |
|
| 47 | 47 | $valueA = self::getArrayElementValueFromKey($sortingArray['key'], $first); |
| 48 | 48 | $valueB = self::getArrayElementValueFromKey($sortingArray['key'], $second); |
| 49 | 49 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | private static function getValueFromKeysArray($keysArray, $arrayElement) |
| 58 | 58 | { |
| 59 | - if (count($keysArray)>1) { |
|
| 59 | + if (count($keysArray) > 1) { |
|
| 60 | 60 | $key = array_shift($keysArray); |
| 61 | 61 | |
| 62 | 62 | return self::getValueFromKeysArray($keysArray, ArrayConverter::convertToPlainArray($arrayElement[$key])); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function removeElement($key) |
| 110 | 110 | { |
| 111 | - if(!isset($this->array[$key])){ |
|
| 111 | + if (!isset($this->array[$key])) { |
|
| 112 | 112 | throw new NotExistingElementException(sprintf('Element with key %s does not exists.', $key)); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -323,12 +323,12 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | foreach ($this->criteria as $criterion) { |
| 325 | 325 | $results = array_filter( |
| 326 | - (isset($results)) ? $results : $array, function ($element) use ($criterion) { |
|
| 326 | + (isset($results)) ? $results : $array, function($element) use ($criterion) { |
|
| 327 | 327 | return CriterionFilter::filter($criterion, $element); |
| 328 | 328 | } |
| 329 | 329 | ); |
| 330 | 330 | |
| 331 | - $results = array_map(function ($result) use ($criterion) { |
|
| 331 | + $results = array_map(function($result) use ($criterion) { |
|
| 332 | 332 | $key = explode(Constants::ALIAS_DELIMITER, $criterion['key']); |
| 333 | 333 | if (count($key) > 1) { |
| 334 | 334 | $oldkey = explode(Constants::ARRAY_SEPARATOR, $key[0]); |