@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $this->setModelForOptions($options); |
53 | 53 | } |
54 | 54 | |
55 | - if (! is_null($title)) { |
|
55 | + if (!is_null($title)) { |
|
56 | 56 | $this->setDisplay($title); |
57 | 57 | } |
58 | 58 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if ($this->multiple) { |
78 | 78 | $this->setHtmlAttribute('multiple', 'multiple'); |
79 | 79 | |
80 | - if (! in_array($this->operator, ['in', 'not_in'])) { |
|
80 | + if (!in_array($this->operator, ['in', 'not_in'])) { |
|
81 | 81 | $this->setOperator('in'); |
82 | 82 | } |
83 | 83 | } else { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function getOptions() |
123 | 123 | { |
124 | - if (! is_null($this->getModelForOptions()) and ! is_null($this->getDisplay())) { |
|
124 | + if (!is_null($this->getModelForOptions()) and !is_null($this->getDisplay())) { |
|
125 | 125 | $this->setOptions( |
126 | 126 | $this->loadOptions() |
127 | 127 | ); |
@@ -74,8 +74,8 @@ |
||
74 | 74 | */ |
75 | 75 | protected function getFormatedDate($date) |
76 | 76 | { |
77 | - if (! is_null($date)) { |
|
78 | - if (! $date instanceof Carbon) { |
|
77 | + if (!is_null($date)) { |
|
78 | + if (!$date instanceof Carbon) { |
|
79 | 79 | $date = Carbon::parse($date); |
80 | 80 | } |
81 | 81 |
@@ -91,10 +91,10 @@ discard block |
||
91 | 91 | $this->controlActive = false; |
92 | 92 | |
93 | 93 | if ($this->isInitialize()) { |
94 | - $this->columns = $this->columns->filter(function ($column) { |
|
94 | + $this->columns = $this->columns->filter(function($column) { |
|
95 | 95 | $class = get_class($this->getControlColumn()); |
96 | 96 | |
97 | - return ! ($column instanceof $class); |
|
97 | + return !($column instanceof $class); |
|
98 | 98 | }); |
99 | 99 | } |
100 | 100 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function set($columns) |
118 | 118 | { |
119 | - if (! is_array($columns)) { |
|
119 | + if (!is_array($columns)) { |
|
120 | 120 | $columns = func_get_args(); |
121 | 121 | } |
122 | 122 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | public function initialize() |
164 | 164 | { |
165 | - $this->all()->each(function (ColumnInterface $column) { |
|
165 | + $this->all()->each(function(ColumnInterface $column) { |
|
166 | 166 | $column->initialize(); |
167 | 167 | }); |
168 | 168 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | $columns = $this->all(); |
206 | 206 | |
207 | - if (! is_int(key($orders))) { |
|
207 | + if (!is_int(key($orders))) { |
|
208 | 208 | $orders = [$orders]; |
209 | 209 | } |
210 | 210 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $columnIndex = array_get($order, 'column'); |
213 | 213 | $direction = array_get($order, 'dir', 'asc'); |
214 | 214 | |
215 | - if (! $columnIndex && $columnIndex !== '0') { |
|
215 | + if (!$columnIndex && $columnIndex !== '0') { |
|
216 | 216 | continue; |
217 | 217 | } |
218 | 218 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function set($columnFilters) |
37 | 37 | { |
38 | - if (! is_array($columnFilters)) { |
|
38 | + if (!is_array($columnFilters)) { |
|
39 | 39 | $columnFilters = func_get_args(); |
40 | 40 | } |
41 | 41 | |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | |
174 | 174 | $display = $this->getDisplay(); |
175 | 175 | |
176 | - if (! $display->getExtensions()->has('columns')) { |
|
176 | + if (!$display->getExtensions()->has('columns')) { |
|
177 | 177 | return; |
178 | 178 | } |
179 | 179 | |
180 | 180 | $columns = $display->getColumns()->all(); |
181 | 181 | |
182 | - if (! is_int(key($search))) { |
|
182 | + if (!is_int(key($search))) { |
|
183 | 183 | $search = [$search]; |
184 | 184 | } |
185 | 185 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | protected function prepareView() |
218 | 218 | { |
219 | - if (! in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
219 | + if (!in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
220 | 220 | $this->view = 'display.extensions.columns_filters'; |
221 | 221 | $this->setHtmlAttribute('class', 'table table-default'); |
222 | 222 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | parent::initialize(); |
71 | 71 | |
72 | 72 | if ($this->getModelConfiguration()->isRestorableModel()) { |
73 | - $this->setApply(function ($q) { |
|
73 | + $this->setApply(function($q) { |
|
74 | 74 | return $q->withTrashed(); |
75 | 75 | }); |
76 | 76 | } |
@@ -192,11 +192,11 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function getCollection() |
194 | 194 | { |
195 | - if (! $this->isInitialized()) { |
|
195 | + if (!$this->isInitialized()) { |
|
196 | 196 | throw new \Exception('Display is not initialized'); |
197 | 197 | } |
198 | 198 | |
199 | - if (! is_null($this->collection)) { |
|
199 | + if (!is_null($this->collection)) { |
|
200 | 200 | return $this->collection; |
201 | 201 | } |
202 | 202 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function placable() |
17 | 17 | { |
18 | - return $this->filter(function (DisplayExtensionInterface $extension) { |
|
18 | + return $this->filter(function(DisplayExtensionInterface $extension) { |
|
19 | 19 | return $extension instanceof Placable; |
20 | 20 | }); |
21 | 21 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function renderable() |
44 | 44 | { |
45 | - return $this->filter(function (DisplayExtensionInterface $extension) { |
|
45 | + return $this->filter(function(DisplayExtensionInterface $extension) { |
|
46 | 46 | return $extension instanceof Renderable; |
47 | 47 | }); |
48 | 48 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function sortByOrder() |
54 | 54 | { |
55 | - return $this->sortBy(function (DisplayExtensionInterface $extension) { |
|
55 | + return $this->sortBy(function(DisplayExtensionInterface $extension) { |
|
56 | 56 | return $extension->getOrder(); |
57 | 57 | }); |
58 | 58 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function initialize() |
64 | 64 | { |
65 | - $this->each(function (DisplayExtensionInterface $extension) { |
|
65 | + $this->each(function(DisplayExtensionInterface $extension) { |
|
66 | 66 | if ($extension instanceof Initializable) { |
67 | 67 | $extension->initialize(); |
68 | 68 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function modifyQuery(\Illuminate\Database\Eloquent\Builder $query) |
78 | 78 | { |
79 | - $this->each(function (DisplayExtensionInterface $extension) use ($query) { |
|
79 | + $this->each(function(DisplayExtensionInterface $extension) use ($query) { |
|
80 | 80 | $extension->modifyQuery($query); |
81 | 81 | }); |
82 | 82 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $class = get_class($class); |
122 | 122 | } |
123 | 123 | |
124 | - if (! $this->hasModel($class)) { |
|
124 | + if (!$this->hasModel($class)) { |
|
125 | 125 | $this->registerModel($class); |
126 | 126 | } |
127 | 127 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function initializeElements() |
25 | 25 | { |
26 | - $this->getElements()->each(function ($element) { |
|
26 | + $this->getElements()->each(function($element) { |
|
27 | 27 | if ($element instanceof Initializable) { |
28 | 28 | $element->initialize(); |
29 | 29 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | foreach ($this->getElements() as $element) { |
43 | 43 | if ($element instanceof ElementsInterface) { |
44 | - if (! is_null($found = $element->getElement($path))) { |
|
44 | + if (!is_null($found = $element->getElement($path))) { |
|
45 | 45 | return $found; |
46 | 46 | } |
47 | 47 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | protected function setModelForElements(Model $model) |
147 | 147 | { |
148 | - $this->getElements()->each(function ($element) use ($model) { |
|
148 | + $this->getElements()->each(function($element) use ($model) { |
|
149 | 149 | $element = $this->getElementContainer($element); |
150 | 150 | |
151 | 151 | if ($element instanceof WithModel) { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | protected function getValidationRulesFromElements(array $rules = []) |
165 | 165 | { |
166 | - $this->getElements()->onlyActive()->each(function ($element) use (&$rules) { |
|
166 | + $this->getElements()->onlyActive()->each(function($element) use (&$rules) { |
|
167 | 167 | $element = $this->getElementContainer($element); |
168 | 168 | |
169 | 169 | if ($element instanceof Validable) { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | protected function getValidationMessagesForElements(array $messages = []) |
183 | 183 | { |
184 | - $this->getElements()->onlyActive()->each(function ($element) use (&$messages) { |
|
184 | + $this->getElements()->onlyActive()->each(function($element) use (&$messages) { |
|
185 | 185 | $element = $this->getElementContainer($element); |
186 | 186 | |
187 | 187 | if ($element instanceof Validable) { |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | protected function getValidationLabelsForElements(array $labels = []) |
201 | 201 | { |
202 | - $this->getElements()->onlyActive()->each(function ($element) use (&$labels) { |
|
202 | + $this->getElements()->onlyActive()->each(function($element) use (&$labels) { |
|
203 | 203 | $element = $this->getElementContainer($element); |
204 | 204 | |
205 | 205 | if ($element instanceof Validable) { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | protected function saveElements(\Illuminate\Http\Request $request) |
219 | 219 | { |
220 | - $this->getElements()->onlyActive()->each(function ($element) use ($request) { |
|
220 | + $this->getElements()->onlyActive()->each(function($element) use ($request) { |
|
221 | 221 | $element = $this->getElementContainer($element); |
222 | 222 | |
223 | 223 | if ($element instanceof FormElementInterface) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | protected function afterSaveElements(\Illuminate\Http\Request $request) |
235 | 235 | { |
236 | - $this->getElements()->onlyActive()->each(function ($element) use ($request) { |
|
236 | + $this->getElements()->onlyActive()->each(function($element) use ($request) { |
|
237 | 237 | $element = $this->getElementContainer($element); |
238 | 238 | |
239 | 239 | if ($element instanceof FormElementInterface) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | list($name, $params) = $this->currentRoute->get(); |
35 | 35 | } |
36 | 36 | |
37 | - if (! $this->exists($name)) { |
|
37 | + if (!$this->exists($name)) { |
|
38 | 38 | return ''; |
39 | 39 | } |
40 | 40 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function renderIfExistsArray($name, $params = []) |
62 | 62 | { |
63 | - if (! $this->exists($name)) { |
|
63 | + if (!$this->exists($name)) { |
|
64 | 64 | return ''; |
65 | 65 | } |
66 | 66 |