@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | public function registerProviders() |
40 | 40 | { |
41 | - foreach (config('sleeping_owl.providers', []) as $providerClass) { |
|
41 | + foreach (config('sleeping_owl.providers', [ ]) as $providerClass) { |
|
42 | 42 | $this->app->register($providerClass); |
43 | 43 | } |
44 | 44 | } |
@@ -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 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /** |
10 | 10 | * @var array |
11 | 11 | */ |
12 | - protected static $routes = []; |
|
12 | + protected static $routes = [ ]; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @return array |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * @var array |
24 | 24 | */ |
25 | - protected $aliases = []; |
|
25 | + protected $aliases = [ ]; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Register new alias. |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function add($alias, $class) |
36 | 36 | { |
37 | - $this->aliases[$alias] = $class; |
|
37 | + $this->aliases[ $alias ] = $class; |
|
38 | 38 | |
39 | 39 | if (method_exists($class, 'registerRoutes')) { |
40 | - self::$routes[] = [$class, 'registerRoutes']; |
|
40 | + self::$routes[ ] = [ $class, 'registerRoutes' ]; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | return $this; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getAlias($alias) |
68 | 68 | { |
69 | - return $this->aliases[$alias]; |
|
69 | + return $this->aliases[ $alias ]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function __call($name, $arguments) |
93 | 93 | { |
94 | - if (! $this->hasAlias($name)) { |
|
94 | + if (!$this->hasAlias($name)) { |
|
95 | 95 | throw new BadMethodCallException($name); |
96 | 96 | } |
97 | 97 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | | |
46 | 46 | */ |
47 | 47 | |
48 | - 'middleware' => ['web'], |
|
48 | + 'middleware' => [ 'web' ], |
|
49 | 49 | |
50 | 50 | /* |
51 | 51 | |-------------------------------------------------------------------------- |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * See https://github.com/NextStepWebs/simplemde-markdown-editor |
134 | 134 | */ |
135 | 135 | 'simplemde' => [ |
136 | - 'hideIcons' => ['side-by-side', 'fullscreen'], |
|
136 | + 'hideIcons' => [ 'side-by-side', 'fullscreen' ], |
|
137 | 137 | ], |
138 | 138 | ], |
139 | 139 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | | Select default settings for datatable |
146 | 146 | | |
147 | 147 | */ |
148 | - 'datatables' => [], |
|
148 | + 'datatables' => [ ], |
|
149 | 149 | |
150 | 150 | /* |
151 | 151 | |-------------------------------------------------------------------------- |
@@ -62,6 +62,6 @@ |
||
62 | 62 | | |
63 | 63 | */ |
64 | 64 | |
65 | - 'attributes' => [], |
|
65 | + 'attributes' => [ ], |
|
66 | 66 | |
67 | 67 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -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 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $messages = parent::getValidationMessages(); |
290 | 290 | |
291 | 291 | foreach ($this->validationMessages as $rule => $message) { |
292 | - $messages[$this->getName().'.'.$rule] = $message; |
|
292 | + $messages[ $this->getName().'.'.$rule ] = $message; |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | return $messages; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | */ |
316 | 316 | public function addValidationMessage($rule, $message) |
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 | /** |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function getValue() |
336 | 336 | { |
337 | - if (! is_null($value = Request::old($this->getPath()))) { |
|
337 | + if (!is_null($value = Request::old($this->getPath()))) { |
|
338 | 338 | return $value; |
339 | 339 | } |
340 | 340 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $model = $this->getModel(); |
349 | 349 | $value = $this->getDefaultValue(); |
350 | 350 | |
351 | - if (is_null($model) or ! $model->exists) { |
|
351 | + if (is_null($model) or !$model->exists) { |
|
352 | 352 | return $value; |
353 | 353 | } |
354 | 354 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $count = count($relations); |
357 | 357 | |
358 | 358 | if ($count === 1) { |
359 | - if($value){ |
|
359 | + if ($value) { |
|
360 | 360 | return $value; |
361 | 361 | } |
362 | 362 | return $model->getAttribute($this->getAttribute()); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | unset($rule); |
406 | 406 | |
407 | - return [$this->getPath() => $rules]; |
|
407 | + return [ $this->getPath() => $rules ]; |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | /** |