@@ -123,7 +123,7 @@ |
||
123 | 123 | $keyword = $this->request->keyword(); |
124 | 124 | foreach ($this->request->searchableColumnIndex() as $index) { |
125 | 125 | $column = $this->getColumnName($index); |
126 | - if (! $value = Arr::get($data, $column)) { |
|
126 | + if (!$value = Arr::get($data, $column)) { |
|
127 | 127 | continue; |
128 | 128 | } |
129 | 129 |
@@ -131,7 +131,7 @@ |
||
131 | 131 | */ |
132 | 132 | public static function getOrMethod($method) |
133 | 133 | { |
134 | - if (! Str::contains(Str::lower($method), 'or')) { |
|
134 | + if (!Str::contains(Str::lower($method), 'or')) { |
|
135 | 135 | return 'or' . ucfirst($method); |
136 | 136 | } |
137 | 137 |
@@ -224,7 +224,7 @@ |
||
224 | 224 | */ |
225 | 225 | public function setTitle($title, array $attributes) |
226 | 226 | { |
227 | - if (! isset($attributes['title'])) { |
|
227 | + if (!isset($attributes['title'])) { |
|
228 | 228 | $attributes['title'] = $this->getQualifiedTitle($title); |
229 | 229 | } |
230 | 230 |
@@ -41,8 +41,8 @@ |
||
41 | 41 | */ |
42 | 42 | public function rowValue($attribute, $template) |
43 | 43 | { |
44 | - if (! empty($template)) { |
|
45 | - if (! is_callable($template) && Arr::get($this->data, $template)) { |
|
44 | + if (!empty($template)) { |
|
45 | + if (!is_callable($template) && Arr::get($this->data, $template)) { |
|
46 | 46 | $this->data[$attribute] = Arr::get($this->data, $template); |
47 | 47 | } else { |
48 | 48 | $this->data[$attribute] = Helper::compileContent($template, $this->data, $this->row); |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function checkLegacyCode() |
19 | 19 | { |
20 | - if (! $this->get('draw') && $this->get('sEcho')) { |
|
20 | + if (!$this->get('draw') && $this->get('sEcho')) { |
|
21 | 21 | throw new Exception('DataTables legacy code is not supported! Please use DataTables 1.10++ coding convention.'); |
22 | - } elseif (! $this->get('draw') && ! $this->get('columns')) { |
|
22 | + } elseif (!$this->get('draw') && !$this->get('columns')) { |
|
23 | 23 | throw new Exception('Insufficient parameters'); |
24 | 24 | } |
25 | 25 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function orderableColumns() |
65 | 65 | { |
66 | - if (! $this->isOrderable()) { |
|
66 | + if (!$this->isOrderable()) { |
|
67 | 67 | return []; |
68 | 68 | } |
69 | 69 | |
@@ -162,6 +162,6 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function isPaginationable() |
164 | 164 | { |
165 | - return ! is_null($this->get('start')) && ! is_null($this->get('length')) && $this->get('length') != -1; |
|
165 | + return !is_null($this->get('start')) && !is_null($this->get('length')) && $this->get('length') != -1; |
|
166 | 166 | } |
167 | 167 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('config_path')) { |
|
3 | +if (!function_exists('config_path')) { |
|
4 | 4 | /** |
5 | 5 | * Get the configuration path. |
6 | 6 | * |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
16 | -if (! function_exists('public_path')) { |
|
16 | +if (!function_exists('public_path')) { |
|
17 | 17 | /** |
18 | 18 | * Return the path to public dir |
19 | 19 | * |
@@ -115,7 +115,7 @@ |
||
115 | 115 | protected function editColumns($data, $row) |
116 | 116 | { |
117 | 117 | foreach ($this->editColumns as $key => $value) { |
118 | - $value['content'] = Helper::compileContent($value['content'], $data, $row); |
|
118 | + $value['content'] = Helper::compileContent($value['content'], $data, $row); |
|
119 | 119 | Arr::set($data, $value['name'], $value['content']); |
120 | 120 | } |
121 | 121 |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | foreach ($joins as $join) { |
269 | 269 | $table = preg_split('/ as /i', $join->table); |
270 | 270 | $names[] = $table[0]; |
271 | - if (isset($table[1]) && ! empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) { |
|
271 | + if (isset($table[1]) && !empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) { |
|
272 | 272 | $names[] = preg_replace('/^' . $databasePrefix . '/', '', $table[1]); |
273 | 273 | } |
274 | 274 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | */ |
285 | 285 | public function getQueryBuilder($instance = null) |
286 | 286 | { |
287 | - if (! $instance) { |
|
287 | + if (!$instance) { |
|
288 | 288 | $instance = $this->query; |
289 | 289 | } |
290 | 290 | |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | $this->totalRecords = $this->totalCount(); |
540 | 540 | |
541 | 541 | if ($this->totalRecords) { |
542 | - $this->orderRecords(! $orderFirst); |
|
542 | + $this->orderRecords(!$orderFirst); |
|
543 | 543 | $this->filterRecords(); |
544 | 544 | $this->orderRecords($orderFirst); |
545 | 545 | $this->paginate(); |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | */ |
557 | 557 | public function orderRecords($skip) |
558 | 558 | { |
559 | - if (! $skip) { |
|
559 | + if (!$skip) { |
|
560 | 560 | $this->ordering(); |
561 | 561 | } |
562 | 562 | } |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | { |
839 | 839 | $matches = explode(' as ', Str::lower($str)); |
840 | 840 | |
841 | - if (! empty($matches)) { |
|
841 | + if (!empty($matches)) { |
|
842 | 842 | if ($wantsAlias) { |
843 | 843 | return array_pop($matches); |
844 | 844 | } else { |
@@ -770,7 +770,7 @@ |
||
770 | 770 | * Get column name by order column index. |
771 | 771 | * |
772 | 772 | * @param int $index |
773 | - * @return mixed |
|
773 | + * @return boolean|string |
|
774 | 774 | */ |
775 | 775 | protected function getColumnNameByIndex($index) |
776 | 776 | { |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | $myQuery = clone $this->query; |
217 | 217 | $myQuery->orWhereHas($relation, function ($q) use ($column, $keyword, $query) { |
218 | 218 | $sql = $q->select($this->connection->raw('count(1)')) |
219 | - ->where($column, 'like', $keyword) |
|
220 | - ->toSql(); |
|
219 | + ->where($column, 'like', $keyword) |
|
220 | + ->toSql(); |
|
221 | 221 | $sql = "($sql) >= 1"; |
222 | 222 | $query->orWhereRaw($sql, [$keyword]); |
223 | 223 | }); |
@@ -417,8 +417,8 @@ discard block |
||
417 | 417 | } |
418 | 418 | if (! in_array($table, $joins)) { |
419 | 419 | $this->getQueryBuilder() |
420 | - ->leftJoin($table, $foreign, '=', $other) |
|
421 | - ->orderBy($orderBy, $direction); |
|
420 | + ->leftJoin($table, $foreign, '=', $other) |
|
421 | + ->orderBy($orderBy, $direction); |
|
422 | 422 | } |
423 | 423 | } |
424 | 424 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $myQuery = clone $this->query; |
85 | 85 | // if its a normal query ( no union, having and distinct word ) |
86 | 86 | // replace the select with static text to improve performance |
87 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
87 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
88 | 88 | $row_count = $this->connection->getQueryGrammar()->wrap('row_count'); |
89 | 89 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
90 | 90 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | foreach ((array) $this->getQueryBuilder()->joins as $key => $join) { |
416 | 416 | $joins[] = $join->table; |
417 | 417 | } |
418 | - if (! in_array($table, $joins)) { |
|
418 | + if (!in_array($table, $joins)) { |
|
419 | 419 | $this->getQueryBuilder() |
420 | 420 | ->leftJoin($table, $foreign, '=', $other) |
421 | 421 | ->orderBy($orderBy, $direction); |