@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | $value = $this->getValue(); |
15 | 15 | |
16 | - if (! $this->isAllowedEmptyValue() and $this->getModel()->exists() and empty($value)) { |
|
16 | + if (!$this->isAllowedEmptyValue() and $this->getModel()->exists() and empty($value)) { |
|
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | { |
28 | 28 | $data = parent::getValidationRules(); |
29 | 29 | |
30 | - if (! $this->isAllowedEmptyValue() and $this->getModel()->exists()) { |
|
30 | + if (!$this->isAllowedEmptyValue() and $this->getModel()->exists()) { |
|
31 | 31 | foreach ($data as $field => $rules) { |
32 | 32 | foreach ($rules as $i => $rule) { |
33 | 33 | if ($rule == 'required') { |
34 | - unset($data[$field][$i]); |
|
34 | + unset($data[ $field ][ $i ]); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * @var array |
21 | 21 | */ |
22 | - protected $parameters = []; |
|
22 | + protected $parameters = [ ]; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @var bool |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setHeight($height) |
90 | 90 | { |
91 | - $this->parameters['height'] = (int) $height; |
|
91 | + $this->parameters[ 'height' ] = (int) $height; |
|
92 | 92 | |
93 | 93 | return $this; |
94 | 94 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $filteredValue = $value; |
153 | 153 | } |
154 | 154 | |
155 | - if (! empty($this->filteredFieldKey)) { |
|
155 | + if (!empty($this->filteredFieldKey)) { |
|
156 | 156 | parent::setValue($model, $attribute, $value); |
157 | 157 | parent::setValue($model, $this->filteredFieldKey, $filteredValue); |
158 | 158 | } 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 |
@@ -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 | } |
@@ -11,13 +11,13 @@ discard block |
||
11 | 11 | $name = $this->getName(); |
12 | 12 | $value = Request::input($name, ''); |
13 | 13 | |
14 | - if (! empty($value)) { |
|
14 | + if (!empty($value)) { |
|
15 | 15 | $value = explode(',', $value); |
16 | 16 | } else { |
17 | - $value = []; |
|
17 | + $value = [ ]; |
|
18 | 18 | } |
19 | 19 | |
20 | - Request::merge([$name => $value]); |
|
20 | + Request::merge([ $name => $value ]); |
|
21 | 21 | parent::save(); |
22 | 22 | } |
23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | $value = parent::getValue(); |
30 | 30 | if (is_null($value)) { |
31 | - $value = []; |
|
31 | + $value = [ ]; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if (is_string($value)) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function getModelConfiguration() |
33 | 33 | { |
34 | - if (! $this->hasModel()) { |
|
34 | + if (!$this->hasModel()) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function hasModel() |
45 | 45 | { |
46 | - return ! is_null($this->model) and class_exists($this->model); |
|
46 | + return !is_null($this->model) and class_exists($this->model); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getAccessLogic() |
85 | 85 | { |
86 | - if (! is_callable($this->accessLogic)) { |
|
86 | + if (!is_callable($this->accessLogic)) { |
|
87 | 87 | if ($this->hasModel()) { |
88 | - return function () { |
|
88 | + return function() { |
|
89 | 89 | return $this->getModelConfiguration()->isDisplayable(); |
90 | 90 | }; |
91 | 91 | } |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | public function render($view = null) |
103 | 103 | { |
104 | 104 | $data = $this->toArray(); |
105 | - $data['pages'] = $this->getPages(); |
|
105 | + $data[ 'pages' ] = $this->getPages(); |
|
106 | 106 | |
107 | - if (! is_null($view)) { |
|
107 | + if (!is_null($view)) { |
|
108 | 108 | return view($view, $data)->render(); |
109 | 109 | } |
110 | 110 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * @return Closure |
|
86 | + * @return \Closure |
|
87 | 87 | */ |
88 | 88 | public function getAccessLogic() |
89 | 89 | { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | /** |
10 | 10 | * @var array |
11 | 11 | */ |
12 | - protected $sections = []; |
|
12 | + protected $sections = [ ]; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Register the service provider. |
@@ -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 |