@@ -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 |
@@ -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); |
@@ -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 | * |
@@ -53,13 +53,13 @@ |
||
53 | 53 | $myQuery = clone $this->query; |
54 | 54 | // if its a normal query ( no union, having and distinct word ) |
55 | 55 | // replace the select with static text to improve performance |
56 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
56 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
57 | 57 | $row_count = $this->wrap('row_count'); |
58 | 58 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
59 | 59 | } |
60 | 60 | |
61 | 61 | // check for select soft deleted records |
62 | - if (! $this->withTrashed && ! $this->onlyTrashed && $this->modelUseSoftDeletes()) { |
|
62 | + if (!$this->withTrashed && !$this->onlyTrashed && $this->modelUseSoftDeletes()) { |
|
63 | 63 | $myQuery->whereNull($myQuery->getModel()->getQualifiedDeletedAtColumn()); |
64 | 64 | } |
65 | 65 |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function checkLegacyCode() |
77 | 77 | { |
78 | - if (! $this->request->input('draw') && $this->request->input('sEcho')) { |
|
78 | + if (!$this->request->input('draw') && $this->request->input('sEcho')) { |
|
79 | 79 | throw new Exception('DataTables legacy code is not supported! Please use DataTables 1.10++ coding convention.'); |
80 | - } elseif (! $this->request->input('draw') && ! $this->request->input('columns')) { |
|
80 | + } elseif (!$this->request->input('draw') && !$this->request->input('columns')) { |
|
81 | 81 | throw new Exception('Insufficient parameters'); |
82 | 82 | } |
83 | 83 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function orderableColumns() |
112 | 112 | { |
113 | - if (! $this->isOrderable()) { |
|
113 | + if (!$this->isOrderable()) { |
|
114 | 114 | return []; |
115 | 115 | } |
116 | 116 | |
@@ -221,6 +221,6 @@ discard block |
||
221 | 221 | */ |
222 | 222 | public function isPaginationable() |
223 | 223 | { |
224 | - return ! is_null($this->request->input('start')) && ! is_null($this->request->input('length')) && $this->request->input('length') != -1; |
|
224 | + return !is_null($this->request->input('start')) && !is_null($this->request->input('length')) && $this->request->input('length') != -1; |
|
225 | 225 | } |
226 | 226 | } |
@@ -112,7 +112,7 @@ |
||
112 | 112 | */ |
113 | 113 | public function getHtmlBuilder() |
114 | 114 | { |
115 | - if (! class_exists('\Yajra\Datatables\Html\Builder')) { |
|
115 | + if (!class_exists('\Yajra\Datatables\Html\Builder')) { |
|
116 | 116 | throw new \Exception('Please install yajra/laravel-datatables-html to be able to use this function.'); |
117 | 117 | } |
118 | 118 |
@@ -237,7 +237,7 @@ |
||
237 | 237 | { |
238 | 238 | $arrayDot = array_filter(array_dot($row)); |
239 | 239 | foreach ($arrayDot as $key => $value) { |
240 | - if (! in_array($key, $this->rawColumns)) { |
|
240 | + if (!in_array($key, $this->rawColumns)) { |
|
241 | 241 | $arrayDot[$key] = e($value); |
242 | 242 | } |
243 | 243 | } |
@@ -189,7 +189,7 @@ |
||
189 | 189 | |
190 | 190 | foreach ($this->request->searchableColumnIndex() as $index) { |
191 | 191 | $column = $this->getColumnName($index); |
192 | - if (! $value = Arr::get($data, $column)) { |
|
192 | + if (!$value = Arr::get($data, $column)) { |
|
193 | 193 | continue; |
194 | 194 | } |
195 | 195 |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $this->totalRecords = $this->totalCount(); |
425 | 425 | |
426 | 426 | if ($this->totalRecords) { |
427 | - $this->orderRecords(! $orderFirst); |
|
427 | + $this->orderRecords(!$orderFirst); |
|
428 | 428 | $this->filterRecords(); |
429 | 429 | $this->orderRecords($orderFirst); |
430 | 430 | $this->paginate(); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | */ |
458 | 458 | protected function orderRecords($skip) |
459 | 459 | { |
460 | - if (! $skip) { |
|
460 | + if (!$skip) { |
|
461 | 461 | $this->ordering(); |
462 | 462 | } |
463 | 463 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | */ |
489 | 489 | protected function paginate() |
490 | 490 | { |
491 | - if ($this->request->isPaginationable() && ! $this->skipPaging) { |
|
491 | + if ($this->request->isPaginationable() && !$this->skipPaging) { |
|
492 | 492 | $this->paging(); |
493 | 493 | } |
494 | 494 | } |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | */ |
791 | 791 | public function pushToBlacklist($column) |
792 | 792 | { |
793 | - if (! $this->isBlacklisted($column)) { |
|
793 | + if (!$this->isBlacklisted($column)) { |
|
794 | 794 | array_push($this->columnDef['blacklist'], $column); |
795 | 795 | } |
796 | 796 | |
@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | { |
946 | 946 | $matches = explode(' as ', Str::lower($str)); |
947 | 947 | |
948 | - if (! empty($matches)) { |
|
948 | + if (!empty($matches)) { |
|
949 | 949 | if ($wantsAlias) { |
950 | 950 | return array_pop($matches); |
951 | 951 | } else { |