@@ -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 | * |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('datatables')) { |
|
3 | +if (!function_exists('datatables')) { |
|
4 | 4 | /** |
5 | 5 | * Helper to make a new DataTable instance from source. |
6 | 6 | * Or return the factory if source is not set. |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function orderableColumns() |
92 | 92 | { |
93 | - if (! $this->isOrderable()) { |
|
93 | + if (!$this->isOrderable()) { |
|
94 | 94 | return []; |
95 | 95 | } |
96 | 96 | |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function isPaginationable() |
222 | 222 | { |
223 | - return ! is_null($this->request->input('start')) && |
|
224 | - ! is_null($this->request->input('length')) && |
|
223 | + return !is_null($this->request->input('start')) && |
|
224 | + !is_null($this->request->input('length')) && |
|
225 | 225 | $this->request->input('length') != -1; |
226 | 226 | } |
227 | 227 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | */ |
135 | 135 | public function getHtmlBuilder() |
136 | 136 | { |
137 | - if (! class_exists('\Yajra\DataTables\Html\Builder')) { |
|
137 | + if (!class_exists('\Yajra\DataTables\Html\Builder')) { |
|
138 | 138 | throw new \Exception('Please install yajra/laravel-datatables-html to be able to use this function.'); |
139 | 139 | } |
140 | 140 |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public static function getOrMethod($method) |
142 | 142 | { |
143 | - if (! Str::contains(Str::lower($method), 'or')) { |
|
143 | + if (!Str::contains(Str::lower($method), 'or')) { |
|
144 | 144 | return 'or' . ucfirst($method); |
145 | 145 | } |
146 | 146 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | { |
257 | 257 | $matches = explode(' as ', Str::lower($str)); |
258 | 258 | |
259 | - if (! empty($matches)) { |
|
259 | + if (!empty($matches)) { |
|
260 | 260 | if ($wantsAlias) { |
261 | 261 | return array_pop($matches); |
262 | 262 | } |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | { |
101 | 101 | $columns = $this->request->get('columns', []); |
102 | 102 | for ($i = 0, $c = count($columns); $i < $c; $i++) { |
103 | - $column = $this->getColumnName($i); |
|
103 | + $column = $this->getColumnName($i); |
|
104 | 104 | |
105 | - if (! $this->request->isColumnSearchable($i) || $this->isBlacklisted($column)) { |
|
105 | + if (!$this->request->isColumnSearchable($i) || $this->isBlacklisted($column)) { |
|
106 | 106 | continue; |
107 | 107 | } |
108 | 108 | |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | foreach ($this->request->searchableColumnIndex() as $index) { |
233 | 233 | $column = $this->getColumnName($index); |
234 | 234 | $value = Arr::get($data, $column); |
235 | - if (! $value || is_array($value)) { |
|
236 | - if (! is_numeric($value)) { |
|
235 | + if (!$value || is_array($value)) { |
|
236 | + if (!is_numeric($value)) { |
|
237 | 237 | continue; |
238 | 238 | } |
239 | 239 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | protected function defaultOrdering() |
257 | 257 | { |
258 | 258 | $criteria = $this->request->orderableColumns(); |
259 | - if (! empty($criteria)) { |
|
259 | + if (!empty($criteria)) { |
|
260 | 260 | $sorter = $this->getSorter($criteria); |
261 | 261 | |
262 | 262 | $this->collection = $this->collection |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | */ |
123 | 123 | protected function isNotEagerLoaded($relation) |
124 | 124 | { |
125 | - return ! $relation |
|
126 | - || ! array_key_exists($relation, $this->query->getEagerLoads()) |
|
125 | + return !$relation |
|
126 | + || !array_key_exists($relation, $this->query->getEagerLoads()) |
|
127 | 127 | || $relation === $this->query->getModel()->getTable(); |
128 | 128 | } |
129 | 129 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $joins[] = $join->table; |
197 | 197 | } |
198 | 198 | |
199 | - if (! in_array($table, $joins)) { |
|
199 | + if (!in_array($table, $joins)) { |
|
200 | 200 | $this->getBaseQueryBuilder()->join($table, $foreign, '=', $other, $type); |
201 | 201 | } |
202 | 202 | } |
@@ -45,9 +45,9 @@ |
||
45 | 45 | foreach ($engines as $engine => $class) { |
46 | 46 | $engine = Str::camel($engine); |
47 | 47 | |
48 | - if (! method_exists(DataTables::class, $engine) && ! DataTables::hasMacro($engine)) { |
|
48 | + if (!method_exists(DataTables::class, $engine) && !DataTables::hasMacro($engine)) { |
|
49 | 49 | DataTables::macro($engine, function () use ($class) { |
50 | - if (! call_user_func_array([$class, 'canCreate'], func_get_args())) { |
|
50 | + if (!call_user_func_array([$class, 'canCreate'], func_get_args())) { |
|
51 | 51 | throw new \InvalidArgumentException(); |
52 | 52 | } |
53 | 53 |