Completed
Push — master ( 18a507...e0c9d9 )
by Song
02:38
created
src/Grid/Concerns/HasQuickSearch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         if (is_array($this->search)) {
68 68
             foreach ($this->search as $column) {
69
-                $this->addWhereLikeBinding($column, true, '%' . $query . '%');
69
+                $this->addWhereLikeBinding($column, true, '%'.$query.'%');
70 70
             }
71 71
         } elseif (is_null($this->search)) {
72 72
             $this->addWhereBindings($query);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         foreach ($this->parseQueryBindings($queries) as list($column, $condition, $or)) {
86 86
 
87 87
             if (preg_match('/(?<not>!?)\((?<values>.+)\)/', $condition, $match) !== 0) {
88
-                $this->addWhereInBinding($column, $or, (bool)$match['not'], $match['values']);
88
+                $this->addWhereInBinding($column, $or, (bool) $match['not'], $match['values']);
89 89
                 continue;
90 90
             }
91 91
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function parseQueryBindings(array $queries)
126 126
     {
127
-        $columnMap = $this->columns->mapWithKeys(function (Column $column) {
127
+        $columnMap = $this->columns->mapWithKeys(function(Column $column) {
128 128
 
129 129
             $label = $column->getLabel();
130 130
             $name  = $column->getName();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             return [$label => $name, $name => $name];
133 133
         });
134 134
 
135
-        return collect($queries)->map(function ($query) use ($columnMap) {
135
+        return collect($queries)->map(function($query) use ($columnMap) {
136 136
             $segments = explode(':', $query, 2);
137 137
 
138 138
             if (count($segments) != 2) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     protected function addWhereDatetimeBinding(string $column, bool $or, string $function, string $value)
183 183
     {
184
-        $method = ($or ? 'orWhere' : 'where') . ucfirst($function);
184
+        $method = ($or ? 'orWhere' : 'where').ucfirst($function);
185 185
 
186 186
         $this->model()->$method($column, $value);
187 187
     }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
         $where = $or ? 'orWhere' : 'where';
208 208
 
209
-        $method = $where . ($not ? 'NotIn' : 'In');
209
+        $method = $where.($not ? 'NotIn' : 'In');
210 210
 
211 211
         $this->model()->$method($column, $values);
212 212
     }
Please login to merge, or discard this patch.