@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function setItems($items) |
42 | 42 | { |
43 | - if (! is_array($items)) { |
|
43 | + if (!is_array($items)) { |
|
44 | 44 | $items = func_get_args(); |
45 | 45 | } |
46 | 46 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function addHeader($items) |
70 | 70 | { |
71 | - if (! is_array($items)) { |
|
71 | + if (!is_array($items)) { |
|
72 | 72 | $items = func_get_args(); |
73 | 73 | } |
74 | 74 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function addBody($items) |
86 | 86 | { |
87 | - if (! is_array($items)) { |
|
87 | + if (!is_array($items)) { |
|
88 | 88 | $items = func_get_args(); |
89 | 89 | } |
90 | 90 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function addFooter($items) |
106 | 106 | { |
107 | - if (! is_array($items)) { |
|
107 | + if (!is_array($items)) { |
|
108 | 108 | $items = func_get_args(); |
109 | 109 | } |
110 | 110 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct(Closure $callback = null) |
26 | 26 | { |
27 | - if (! is_null($callback)) { |
|
27 | + if (!is_null($callback)) { |
|
28 | 28 | $this->setCallback($callback); |
29 | 29 | } |
30 | 30 |
@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | protected static function validate(\Illuminate\Validation\Validator $validator) |
16 | 16 | { |
17 | - $validator->after(function ($validator) { |
|
17 | + $validator->after(function($validator) { |
|
18 | 18 | /** @var \Illuminate\Http\UploadedFile $file */ |
19 | 19 | $file = array_get($validator->attributes(), 'file'); |
20 | 20 | |
21 | 21 | $size = getimagesize($file->getRealPath()); |
22 | 22 | |
23 | - if (! $size) { |
|
23 | + if (!$size) { |
|
24 | 24 | $validator->errors()->add('file', trans('sleeping_owl::validation.not_image')); |
25 | 25 | } |
26 | 26 | }); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | if (Request::input($this->getPath().'_remove')) { |
33 | 33 | $this->setValue($this->getModel(), $this->getAttribute(), null); |
34 | - } elseif (! is_null($value)) { |
|
34 | + } elseif (!is_null($value)) { |
|
35 | 35 | $this->setValue($this->getModel(), $this->getAttribute(), $value); |
36 | 36 | } |
37 | 37 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'select' => \SleepingOwl\Admin\Display\Column\Filter\Select::class, |
28 | 28 | ]); |
29 | 29 | |
30 | - $this->app->singleton('sleeping_owl.column_filter', function () use ($alias) { |
|
30 | + $this->app->singleton('sleeping_owl.column_filter', function() use ($alias) { |
|
31 | 31 | return $alias; |
32 | 32 | }); |
33 | 33 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'tree' => \SleepingOwl\Admin\Display\DisplayTree::class, |
44 | 44 | ]); |
45 | 45 | |
46 | - $this->app->singleton('sleeping_owl.display', function () use ($alias) { |
|
46 | + $this->app->singleton('sleeping_owl.display', function() use ($alias) { |
|
47 | 47 | return $alias; |
48 | 48 | }); |
49 | 49 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'treeControl' => \SleepingOwl\Admin\Display\Column\TreeControl::class, |
69 | 69 | ]); |
70 | 70 | |
71 | - $this->app->singleton('sleeping_owl.table.column', function () use ($alias) { |
|
71 | + $this->app->singleton('sleeping_owl.table.column', function() use ($alias) { |
|
72 | 72 | return $alias; |
73 | 73 | }); |
74 | 74 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | 'checkbox' => \SleepingOwl\Admin\Display\Column\Editable\Checkbox::class, |
80 | 80 | ]); |
81 | 81 | |
82 | - $this->app->singleton('sleeping_owl.table.column.editable', function () use ($alias) { |
|
82 | + $this->app->singleton('sleeping_owl.table.column.editable', function() use ($alias) { |
|
83 | 83 | return $alias; |
84 | 84 | }); |
85 | 85 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'html' => \SleepingOwl\Admin\Form\Element\Html::class, |
112 | 112 | ]); |
113 | 113 | |
114 | - $this->app->singleton('sleeping_owl.form.element', function () use ($alias) { |
|
114 | + $this->app->singleton('sleeping_owl.form.element', function() use ($alias) { |
|
115 | 115 | return $alias; |
116 | 116 | }); |
117 | 117 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'panel' => \SleepingOwl\Admin\Form\FormPanel::class, |
125 | 125 | ]); |
126 | 126 | |
127 | - $this->app->singleton('sleeping_owl.form', function () use ($alias) { |
|
127 | + $this->app->singleton('sleeping_owl.form', function() use ($alias) { |
|
128 | 128 | return $alias; |
129 | 129 | }); |
130 | 130 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'related' => \SleepingOwl\Admin\Display\Filter\FilterRelated::class, |
139 | 139 | ]); |
140 | 140 | |
141 | - $this->app->singleton('sleeping_owl.display.filter', function () use ($alias) { |
|
141 | + $this->app->singleton('sleeping_owl.display.filter', function() use ($alias) { |
|
142 | 142 | return $alias; |
143 | 143 | }); |
144 | 144 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | $relationName = implode('.', $parts); |
39 | 39 | } |
40 | 40 | |
41 | - if (! is_null($relationName)) { |
|
42 | - $query->whereHas($relationName, function ($q) use ($name, $value) { |
|
41 | + if (!is_null($relationName)) { |
|
42 | + $query->whereHas($relationName, function($q) use ($name, $value) { |
|
43 | 43 | $this->buildQuery($q, $name, $value); |
44 | 44 | }); |
45 | 45 | } else { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct(Closure $callback = null) |
26 | 26 | { |
27 | - if (! is_null($callback)) { |
|
27 | + if (!is_null($callback)) { |
|
28 | 28 | $this->setCallback($callback); |
29 | 29 | } |
30 | 30 |
@@ -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 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function getDefaultFrom() |
29 | 29 | { |
30 | - if (! $this->defaultFrom) { |
|
30 | + if (!$this->defaultFrom) { |
|
31 | 31 | $this->defaultFrom = Carbon::now(); |
32 | 32 | } |
33 | 33 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getDefaultTo() |
55 | 55 | { |
56 | - if (! $this->defaultTo) { |
|
56 | + if (!$this->defaultTo) { |
|
57 | 57 | $this->defaultTo = Carbon::now(); |
58 | 58 | } |
59 | 59 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function setValue(Model $model, $attribute, $value) |
83 | 83 | { |
84 | - $value = ! empty($value) ? array_map(function ($date) { |
|
84 | + $value = !empty($value) ? array_map(function($date) { |
|
85 | 85 | return Carbon::createFromFormat($this->getPickerFormat(), $date); |
86 | 86 | }, explode('::', $value)) : null; |
87 | 87 |