Completed
Push — master ( 719ac8...779e62 )
by Stanislav
02:21 queued 41s
created
src/Helpers/TableUtils.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.