@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | */ |
334 | 334 | public function isCreatable() |
335 | 335 | { |
336 | - if (! is_callable($this->getCreate())) { |
|
336 | + if (!is_callable($this->getCreate())) { |
|
337 | 337 | return false; |
338 | 338 | } |
339 | 339 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | */ |
358 | 358 | public function isEditable(Model $model) |
359 | 359 | { |
360 | - if (! is_callable($this->getEdit())) { |
|
360 | + if (!is_callable($this->getEdit())) { |
|
361 | 361 | return false; |
362 | 362 | } |
363 | 363 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | */ |
468 | 468 | public function fireDisplay() |
469 | 469 | { |
470 | - if (! is_callable($this->display)) { |
|
470 | + if (!is_callable($this->display)) { |
|
471 | 471 | return; |
472 | 472 | } |
473 | 473 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | */ |
486 | 486 | public function fireCreate() |
487 | 487 | { |
488 | - if (! is_callable($this->create)) { |
|
488 | + if (!is_callable($this->create)) { |
|
489 | 489 | return; |
490 | 490 | } |
491 | 491 | |
@@ -512,11 +512,11 @@ discard block |
||
512 | 512 | */ |
513 | 513 | public function fireEdit($id) |
514 | 514 | { |
515 | - if (! is_callable($this->edit)) { |
|
515 | + if (!is_callable($this->edit)) { |
|
516 | 516 | return; |
517 | 517 | } |
518 | 518 | |
519 | - $form = app()->call($this->edit, ['id' => $id]); |
|
519 | + $form = app()->call($this->edit, [ 'id' => $id ]); |
|
520 | 520 | if ($form instanceof DisplayInterface) { |
521 | 521 | $form->setModelClass($this->getClass()); |
522 | 522 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | public function fireDelete($id) |
542 | 542 | { |
543 | 543 | if (is_callable($this->getDelete())) { |
544 | - return app()->call($this->getDelete(), [$id]); |
|
544 | + return app()->call($this->getDelete(), [ $id ]); |
|
545 | 545 | } |
546 | 546 | } |
547 | 547 | |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | public function fireDestroy($id) |
554 | 554 | { |
555 | 555 | if (is_callable($this->getDestroy())) { |
556 | - return app()->call($this->getDestroy(), [$id]); |
|
556 | + return app()->call($this->getDestroy(), [ $id ]); |
|
557 | 557 | } |
558 | 558 | } |
559 | 559 | |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | public function fireRestore($id) |
566 | 566 | { |
567 | 567 | if (is_callable($this->getRestore())) { |
568 | - return app()->call($this->getRestore(), [$id]); |
|
568 | + return app()->call($this->getRestore(), [ $id ]); |
|
569 | 569 | } |
570 | 570 | |
571 | 571 | return $this->getRestore(); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | public function __construct() |
11 | 11 | { |
12 | - Meta::addJs('admin-default', resources_url('js/admin-app.js'), ['admin-scripts'], true) |
|
12 | + Meta::addJs('admin-default', resources_url('js/admin-app.js'), [ 'admin-scripts' ], true) |
|
13 | 13 | ->addJs('admin-scripts', route('admin.scripts')) |
14 | 14 | ->addCss('admin-default', resources_url('css/admin-app.css')); |
15 | 15 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * |
55 | 55 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
56 | 56 | */ |
57 | - public function view($view, $data = [], $mergeData = []) |
|
57 | + public function view($view, $data = [ ], $mergeData = [ ]) |
|
58 | 58 | { |
59 | 59 | if ($view instanceof \Illuminate\View\View) { |
60 | 60 | return $view->with($data); |
@@ -26,16 +26,16 @@ discard block |
||
26 | 26 | { |
27 | 27 | $routeName = 'admin.form.element.'.static::$route; |
28 | 28 | |
29 | - if (! $router->has($routeName)) { |
|
30 | - $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', ['as' => $routeName, function ( |
|
29 | + if (!$router->has($routeName)) { |
|
30 | + $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ 'as' => $routeName, function( |
|
31 | 31 | Request $request, |
32 | 32 | ModelConfigurationInterface $model, |
33 | 33 | $field, |
34 | 34 | $id = null |
35 | 35 | ) { |
36 | - if (! is_null($id)) { |
|
36 | + if (!is_null($id)) { |
|
37 | 37 | $item = $model->getRepository()->find($id); |
38 | - if (is_null($item) || ! $model->isEditable($item)) { |
|
38 | + if (is_null($item) || !$model->isEditable($item)) { |
|
39 | 39 | return new JsonResponse([ |
40 | 40 | 'message' => trans('lang.message.access_denied'), |
41 | 41 | ], 403); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $form = $model->fireEdit($id); |
45 | 45 | } else { |
46 | - if (! $model->isCreatable()) { |
|
46 | + if (!$model->isCreatable()) { |
|
47 | 47 | return new JsonResponse([ |
48 | 48 | 'message' => trans('lang.message.access_denied'), |
49 | 49 | ], 403); |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | $form = $model->fireCreate(); |
53 | 53 | } |
54 | 54 | |
55 | - $messages = []; |
|
56 | - $labels = []; |
|
55 | + $messages = [ ]; |
|
56 | + $labels = [ ]; |
|
57 | 57 | $rules = static::defaultUploadValidationRules(); |
58 | 58 | |
59 | - if (! is_null($element = $form->getElement($field))) { |
|
59 | + if (!is_null($element = $form->getElement($field))) { |
|
60 | 60 | $rules = $element->getUploadValidationRules(); |
61 | 61 | $messages = $element->getUploadValidationMessages(); |
62 | 62 | $labels = $element->getUploadValidationLabels(); |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | $file = $request->file('file'); |
77 | 77 | |
78 | 78 | /** @var File $element */ |
79 | - if (! is_null($element = $form->getElement($field))) { |
|
79 | + if (!is_null($element = $form->getElement($field))) { |
|
80 | 80 | $filename = $element->getUploadFileName($file); |
81 | 81 | $path = $element->getUploadPath($file); |
82 | 82 | $settings = $element->getUploadSettings(); |
83 | 83 | } else { |
84 | 84 | $filename = static::defaultUploadFilename($file); |
85 | 85 | $path = static::defaultUploadPath($file); |
86 | - $settings = []; |
|
86 | + $settings = [ ]; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | static::saveFile($file, public_path($path), $filename, $settings); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'url' => asset($value), |
95 | 95 | 'value' => $value, |
96 | 96 | ]); |
97 | - }]); |
|
97 | + } ]); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | protected static function defaultUploadValidationRules() |
143 | 143 | { |
144 | 144 | return [ |
145 | - 'file' => ['required', 'file'], |
|
145 | + 'file' => [ 'required', 'file' ], |
|
146 | 146 | ]; |
147 | 147 | } |
148 | 148 | |
@@ -159,21 +159,21 @@ discard block |
||
159 | 159 | /** |
160 | 160 | * @var array |
161 | 161 | */ |
162 | - protected $uploadSettings = []; |
|
162 | + protected $uploadSettings = [ ]; |
|
163 | 163 | |
164 | 164 | /** |
165 | 165 | * @var array |
166 | 166 | */ |
167 | - protected $uploadValidationRules = ['required', 'file']; |
|
167 | + protected $uploadValidationRules = [ 'required', 'file' ]; |
|
168 | 168 | |
169 | 169 | /** |
170 | 170 | * @return array |
171 | 171 | */ |
172 | 172 | public function getUploadValidationMessages() |
173 | 173 | { |
174 | - $messages = []; |
|
174 | + $messages = [ ]; |
|
175 | 175 | foreach ($this->validationMessages as $rule => $message) { |
176 | - $messages["file.{$rule}"] = $message; |
|
176 | + $messages[ "file.{$rule}" ] = $message; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | return $messages; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function getUploadValidationLabels() |
186 | 186 | { |
187 | - return ['file' => $this->getLabel()]; |
|
187 | + return [ 'file' => $this->getLabel() ]; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function getUploadValidationRules() |
194 | 194 | { |
195 | - return ['file' => array_unique($this->uploadValidationRules)]; |
|
195 | + return [ 'file' => array_unique($this->uploadValidationRules) ]; |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | /** |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function getUploadPath(UploadedFile $file) |
204 | 204 | { |
205 | - if (! is_callable($this->uploadFileName)) { |
|
205 | + if (!is_callable($this->uploadFileName)) { |
|
206 | 206 | return static::defaultUploadPath($file); |
207 | 207 | } |
208 | 208 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function getUploadFileName(UploadedFile $file) |
230 | 230 | { |
231 | - if (! is_callable($this->uploadFileName)) { |
|
231 | + if (!is_callable($this->uploadFileName)) { |
|
232 | 232 | return static::defaultUploadFilename($file); |
233 | 233 | } |
234 | 234 | |
@@ -279,11 +279,11 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function addValidationRule($rule, $message = null) |
281 | 281 | { |
282 | - $uploadRules = ['file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between']; |
|
282 | + $uploadRules = [ 'file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between' ]; |
|
283 | 283 | |
284 | 284 | foreach ($uploadRules as $uploadRule) { |
285 | 285 | if (strpos($rule, $uploadRule) !== false) { |
286 | - $this->uploadValidationRules[] = $rule; |
|
286 | + $this->uploadValidationRules[ ] = $rule; |
|
287 | 287 | |
288 | 288 | if (is_null($message)) { |
289 | 289 | return $this; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * @var array |
57 | 57 | */ |
58 | - protected $validationMessages = []; |
|
58 | + protected $validationMessages = [ ]; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * @param string $path |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | $name = array_shift($parts); |
86 | 86 | |
87 | - while (! empty($parts)) { |
|
87 | + while (!empty($parts)) { |
|
88 | 88 | $part = array_shift($parts); |
89 | 89 | $name .= "[$part]"; |
90 | 90 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $messages = parent::getValidationMessages(); |
286 | 286 | |
287 | 287 | foreach ($this->validationMessages as $rule => $message) { |
288 | - $messages[$this->getName().'.'.$rule] = $message; |
|
288 | + $messages[ $this->getName().'.'.$rule ] = $message; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | return $messages; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $rule = substr($rule, 0, $pos); |
316 | 316 | } |
317 | 317 | |
318 | - $this->validationMessages[$rule] = $message; |
|
318 | + $this->validationMessages[ $rule ] = $message; |
|
319 | 319 | |
320 | 320 | return $this; |
321 | 321 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public function getValidationLabels() |
327 | 327 | { |
328 | - return [$this->getPath() => $this->getLabel()]; |
|
328 | + return [ $this->getPath() => $this->getLabel() ]; |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | */ |
334 | 334 | public function getValueFromRequest() |
335 | 335 | { |
336 | - if (! is_null($value = Request::old($this->getPath()))) { |
|
336 | + if (!is_null($value = Request::old($this->getPath()))) { |
|
337 | 337 | return $value; |
338 | 338 | } |
339 | 339 | |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | */ |
347 | 347 | public function getValue() |
348 | 348 | { |
349 | - if (! is_null($value = $this->getValueFromRequest())) { |
|
349 | + if (!is_null($value = $this->getValueFromRequest())) { |
|
350 | 350 | return $value; |
351 | 351 | } |
352 | 352 | |
353 | 353 | $model = $this->getModel(); |
354 | 354 | $value = $this->getDefaultValue(); |
355 | 355 | |
356 | - if (is_null($model) or ! $model->exists) { |
|
356 | + if (is_null($model) or !$model->exists) { |
|
357 | 357 | return $value; |
358 | 358 | } |
359 | 359 | |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | unset($rule); |
407 | 407 | |
408 | - return [$this->getPath() => $rules]; |
|
408 | + return [ $this->getPath() => $rules ]; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * @var array |
25 | 25 | */ |
26 | - protected $options = []; |
|
26 | + protected $options = [ ]; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @var bool |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * @var array |
45 | 45 | */ |
46 | - protected $exclude = []; |
|
46 | + protected $exclude = [ ]; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * @var string|null |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * @var array |
55 | 55 | */ |
56 | - protected $fetchColumns = []; |
|
56 | + protected $fetchColumns = [ ]; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @var function|\Closure|object callable |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param string|null $label |
66 | 66 | * @param array|Model $options |
67 | 67 | */ |
68 | - public function __construct($path, $label = null, $options = []) |
|
68 | + public function __construct($path, $label = null, $options = [ ]) |
|
69 | 69 | { |
70 | 70 | parent::__construct($path, $label); |
71 | 71 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $modelForOptions = app($modelForOptions); |
97 | 97 | } |
98 | 98 | |
99 | - if (! ($modelForOptions instanceof Model)) { |
|
99 | + if (!($modelForOptions instanceof Model)) { |
|
100 | 100 | throw new SelectException('Class must be instanced of Illuminate\Database\Eloquent\Model'); |
101 | 101 | } |
102 | 102 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function getOptions() |
132 | 132 | { |
133 | - if (! is_null($this->getModelForOptions()) && ! is_null($this->getDisplay())) { |
|
133 | + if (!is_null($this->getModelForOptions()) && !is_null($this->getDisplay())) { |
|
134 | 134 | $this->loadOptions(); |
135 | 135 | } |
136 | 136 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function setFetchColumns($columns) |
239 | 239 | { |
240 | - if (! is_array($columns)) { |
|
240 | + if (!is_array($columns)) { |
|
241 | 241 | $columns = func_get_args(); |
242 | 242 | } |
243 | 243 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | public function exclude($keys) |
300 | 300 | { |
301 | - if (! is_array($keys)) { |
|
301 | + if (!is_array($keys)) { |
|
302 | 302 | $keys = func_get_args(); |
303 | 303 | } |
304 | 304 | |
@@ -344,17 +344,17 @@ discard block |
||
344 | 344 | ]; |
345 | 345 | |
346 | 346 | if ($this->isReadonly()) { |
347 | - $attributes['disabled'] = 'disabled'; |
|
347 | + $attributes[ 'disabled' ] = 'disabled'; |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | if ($this->isNullable()) { |
351 | - $attributes['data-nullable'] = 'true'; |
|
351 | + $attributes[ 'data-nullable' ] = 'true'; |
|
352 | 352 | } |
353 | 353 | |
354 | 354 | $options = $this->getOptions(); |
355 | 355 | |
356 | 356 | if ($this->isNullable()) { |
357 | - $options = [null => trans('sleeping_owl::lang.select.nothing')] + $options; |
|
357 | + $options = [ null => trans('sleeping_owl::lang.select.nothing') ] + $options; |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | $options = array_except($options, $this->exclude); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | protected function loadOptions() |
373 | 373 | { |
374 | - $repository = app(RepositoryInterface::class, [$this->getModelForOptions()]); |
|
374 | + $repository = app(RepositoryInterface::class, [ $this->getModelForOptions() ]); |
|
375 | 375 | |
376 | 376 | $key = $repository->getModel()->getKeyName(); |
377 | 377 | |
@@ -382,12 +382,12 @@ discard block |
||
382 | 382 | } |
383 | 383 | |
384 | 384 | if (count($this->fetchColumns) > 0) { |
385 | - $columns = array_merge([$key], $this->fetchColumns); |
|
385 | + $columns = array_merge([ $key ], $this->fetchColumns); |
|
386 | 386 | $options->select($columns); |
387 | 387 | } |
388 | 388 | |
389 | 389 | // call the pre load options query preparer if has be set |
390 | - if (! is_null($preparer = $this->getLoadOptionsQueryPreparer())) { |
|
390 | + if (!is_null($preparer = $this->getLoadOptionsQueryPreparer())) { |
|
391 | 391 | $options = $preparer($this, $options); |
392 | 392 | } |
393 | 393 | |
@@ -404,9 +404,9 @@ discard block |
||
404 | 404 | |
405 | 405 | // iterate for all options and redefine it as |
406 | 406 | // list of KEY and TEXT pair |
407 | - $options = array_map(function ($opt) use ($key, $makeDisplay) { |
|
407 | + $options = array_map(function($opt) use ($key, $makeDisplay) { |
|
408 | 408 | // get the KEY and make the display text |
409 | - return [data_get($opt, $key), $makeDisplay($opt)]; |
|
409 | + return [ data_get($opt, $key), $makeDisplay($opt) ]; |
|
410 | 410 | }, $options); |
411 | 411 | |
412 | 412 | // take options as array with KEY => VALUE pair |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $value = null; |
54 | 54 | } |
55 | 55 | |
56 | - if (! is_null($value)) { |
|
56 | + if (!is_null($value)) { |
|
57 | 57 | try { |
58 | 58 | $time = Carbon::parse($value); |
59 | 59 | } catch (Exception $e) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function setValue(Model $model, $attribute, $value) |
95 | 95 | { |
96 | - $value = ! empty($value) ? Carbon::createFromFormat($this->getFormat(), $value) : null; |
|
96 | + $value = !empty($value) ? Carbon::createFromFormat($this->getFormat(), $value) : null; |
|
97 | 97 | |
98 | 98 | parent::setValue($model, $attribute, $value); |
99 | 99 | } |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | ]; |
92 | 92 | |
93 | 93 | if ($this->isReadonly()) { |
94 | - $attributes['disabled'] = 'disabled'; |
|
94 | + $attributes[ 'disabled' ] = 'disabled'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if ($this->isTaggable()) { |
98 | - $attributes['class'] .= ' input-taggable'; |
|
98 | + $attributes[ 'class' ] .= ' input-taggable'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | return [ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $attribute = $this->getAttribute(); |
121 | 121 | |
122 | 122 | if (is_null(Request::input($this->getPath()))) { |
123 | - $values = []; |
|
123 | + $values = [ ]; |
|
124 | 124 | } else { |
125 | 125 | $values = $this->getValue(); |
126 | 126 | } |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | |
130 | 130 | if ($relation instanceof \Illuminate\Database\Eloquent\Relations\BelongsToMany) { |
131 | 131 | foreach ($values as $i => $value) { |
132 | - if (! array_key_exists($value, $this->getOptions()) and $this->isTaggable()) { |
|
132 | + if (!array_key_exists($value, $this->getOptions()) and $this->isTaggable()) { |
|
133 | 133 | $model = clone $this->getModelForOptions(); |
134 | 134 | $model->{$this->getDisplay()} = $value; |
135 | 135 | $model->save(); |
136 | 136 | |
137 | - $values[$i] = $model->getKey(); |
|
137 | + $values[ $i ] = $model->getKey(); |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | |
141 | 141 | $relation->sync($values); |
142 | 142 | } elseif ($relation instanceof \Illuminate\Database\Eloquent\Relations\HasMany) { |
143 | 143 | foreach ($relation->get() as $item) { |
144 | - if (! in_array($item->getKey(), $values)) { |
|
144 | + if (!in_array($item->getKey(), $values)) { |
|
145 | 145 | if ($this->isDeleteRelatedItem()) { |
146 | 146 | $item->delete(); |
147 | 147 | } else { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $item = $model->find($value); |
158 | 158 | |
159 | 159 | if (is_null($item)) { |
160 | - if (! $this->isTaggable()) { |
|
160 | + if (!$this->isTaggable()) { |
|
161 | 161 | continue; |
162 | 162 | } |
163 | 163 |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | */ |
18 | 18 | protected static function validate(Validator $validator) |
19 | 19 | { |
20 | - $validator->after(function ($validator) { |
|
20 | + $validator->after(function($validator) { |
|
21 | 21 | /** @var \Illuminate\Http\UploadedFile $file */ |
22 | 22 | $file = array_get($validator->attributes(), 'file'); |
23 | 23 | |
24 | 24 | $size = getimagesize($file->getRealPath()); |
25 | 25 | |
26 | - if (! $size) { |
|
26 | + if (!$size) { |
|
27 | 27 | $validator->errors()->add('file', trans('sleeping_owl::validation.not_image')); |
28 | 28 | } |
29 | 29 | }); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $image = \Intervention\Image\Facades\Image::make($file); |
46 | 46 | |
47 | 47 | foreach ($settings as $method => $args) { |
48 | - call_user_func_array([$image, $method], $args); |
|
48 | + call_user_func_array([ $image, $method ], $args); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $image->save($path.'/'.$filename); |
@@ -77,5 +77,5 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * @var array |
79 | 79 | */ |
80 | - protected $uploadValidationRules = ['required', 'image']; |
|
80 | + protected $uploadValidationRules = [ 'required', 'image' ]; |
|
81 | 81 | } |
@@ -313,11 +313,11 @@ discard block |
||
313 | 313 | */ |
314 | 314 | public function isShowDeleteButton() |
315 | 315 | { |
316 | - if (is_null($this->getModel()->getKey()) || ! $this->showDeleteButton) { |
|
316 | + if (is_null($this->getModel()->getKey()) || !$this->showDeleteButton) { |
|
317 | 317 | return false; |
318 | 318 | } |
319 | 319 | |
320 | - $this->showDeleteButton = ! $this->isTrashed() && $this->getModelConfiguration()->isDeletable($this->getModel()); |
|
320 | + $this->showDeleteButton = !$this->isTrashed() && $this->getModelConfiguration()->isDeletable($this->getModel()); |
|
321 | 321 | |
322 | 322 | return $this->showDeleteButton; |
323 | 323 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function isShowDestroyButton() |
339 | 339 | { |
340 | - if (is_null($this->getModel()->getKey()) || ! $this->showDestroyButton) { |
|
340 | + if (is_null($this->getModel()->getKey()) || !$this->showDestroyButton) { |
|
341 | 341 | return false; |
342 | 342 | } |
343 | 343 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | */ |
363 | 363 | public function isShowRestoreButton() |
364 | 364 | { |
365 | - if (is_null($this->getModel()->getKey()) || ! $this->showRestoreButton) { |
|
365 | + if (is_null($this->getModel()->getKey()) || !$this->showRestoreButton) { |
|
366 | 366 | return false; |
367 | 367 | } |
368 | 368 |