@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | $filters = self::parseFilters($filters); |
| 62 | 62 | |
| 63 | - return array_filter($rows, function ($row) use ($filters) { |
|
| 63 | + return array_filter($rows, function($row) use ($filters) { |
|
| 64 | 64 | foreach ($filters as $columnKey => $filter) { |
| 65 | 65 | if (!isset($row[$columnKey])) { |
| 66 | - throw new \RuntimeException('Column ' . $columnKey . ' not exists, cannot filter'); |
|
| 66 | + throw new \RuntimeException('Column '.$columnKey.' not exists, cannot filter'); |
|
| 67 | 67 | } |
| 68 | 68 | $columnValue = $row[$columnKey]; |
| 69 | 69 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | if ((isset($filter['min']) && $value <= $filter['min']) || |
| 81 | 81 | (isset($filter['max']) && $value >= $filter['max']) || |
| 82 | 82 | (isset($filter['equals']) && $value != $filter['equals']) || |
| 83 | - (isset($filter['regex']) && !preg_match('/' . $filter['regex'] . '/i', $value)) |
|
| 83 | + (isset($filter['regex']) && !preg_match('/'.$filter['regex'].'/i', $value)) |
|
| 84 | 84 | ) { |
| 85 | 85 | return false; |
| 86 | 86 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ); |
| 108 | 108 | $columnIndex--; |
| 109 | 109 | |
| 110 | - usort($rowsSorted, function ($first, $second) use ($columnIndex, $sortOrder) { |
|
| 110 | + usort($rowsSorted, function($first, $second) use ($columnIndex, $sortOrder) { |
|
| 111 | 111 | return $first[$columnIndex] > $second[$columnIndex] ? $sortOrder : $sortOrder * -1; |
| 112 | 112 | }); |
| 113 | 113 | |