@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | $value = $this->getValue(); |
13 | 13 | |
14 | - if (! $this->hasClassProperty('label-', 'bg-')) { |
|
14 | + if (!$this->hasClassProperty('label-', 'bg-')) { |
|
15 | 15 | $this->setHtmlAttribute('class', 'label-primary'); |
16 | 16 | } |
17 | 17 |
@@ -31,12 +31,12 @@ |
||
31 | 31 | Installation\CreateSectionServiceProvider::class, |
32 | 32 | Installation\CreatePublicDirectory::class, |
33 | 33 | ]) |
34 | - ->map(function ($installer) { |
|
34 | + ->map(function($installer) { |
|
35 | 35 | return new $installer($this, $this->config); |
36 | 36 | }) |
37 | - ->filter(function ($installer) { |
|
38 | - return $this->option('force') ? true : ! $installer->installed(); |
|
39 | - })->each(function ($installer) { |
|
37 | + ->filter(function($installer) { |
|
38 | + return $this->option('force') ? true : !$installer->installed(); |
|
39 | + })->each(function($installer) { |
|
40 | 40 | $installer->install(); |
41 | 41 | $installer->showInfo(); |
42 | 42 | }); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | @foreach ($columns as $column) |
23 | 23 | <?php |
24 | 24 | $column->setModel($model); |
25 | - if($column instanceof \SleepingOwl\Admin\Display\Column\Control) { |
|
25 | + if ($column instanceof \SleepingOwl\Admin\Display\Column\Control) { |
|
26 | 26 | $column->initialize(); |
27 | 27 | } |
28 | 28 | ?> |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | - * @return TabInterface[]|DisplayTabsCollection |
|
68 | + * @return \SleepingOwl\Admin\Form\FormElementsCollection |
|
69 | 69 | */ |
70 | 70 | public function getTabs() |
71 | 71 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $this->initializeElements(); |
44 | 44 | |
45 | - $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) { |
|
45 | + $activeTabs = $this->getTabs()->filter(function(TabInterface $tab) { |
|
46 | 46 | return $tab->isActive(); |
47 | 47 | })->count(); |
48 | 48 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function setModelClass($class) |
72 | 72 | { |
73 | - $this->getTabs()->each(function (TabInterface $tab) use ($class) { |
|
73 | + $this->getTabs()->each(function(TabInterface $tab) use ($class) { |
|
74 | 74 | if ($tab instanceof DisplayInterface) { |
75 | 75 | $tab->setModelClass($class); |
76 | 76 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function setAction($action) |
156 | 156 | { |
157 | - $this->getTabs()->each(function (TabInterface $tab) use ($action) { |
|
157 | + $this->getTabs()->each(function(TabInterface $tab) use ($action) { |
|
158 | 158 | if ($tab instanceof FormInterface) { |
159 | 159 | $tab->setAction($action); |
160 | 160 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function setId($id) |
172 | 172 | { |
173 | - $this->getTabs()->each(function (TabInterface $tab) use ($id) { |
|
173 | + $this->getTabs()->each(function(TabInterface $tab) use ($id) { |
|
174 | 174 | if ($tab instanceof FormInterface) { |
175 | 175 | $tab->setId($id); |
176 | 176 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function validateForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $model = null) |
189 | 189 | { |
190 | - $this->getTabs()->each(function ($tab) use ($request, $model) { |
|
190 | + $this->getTabs()->each(function($tab) use ($request, $model) { |
|
191 | 191 | if ($tab instanceof FormInterface) { |
192 | 192 | $tab->validateForm($request, $model); |
193 | 193 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function saveForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $model = null) |
204 | 204 | { |
205 | - $this->getTabs()->each(function (TabInterface $tab) use ($request, $model) { |
|
205 | + $this->getTabs()->each(function(TabInterface $tab) use ($request, $model) { |
|
206 | 206 | if ($tab instanceof FormInterface) { |
207 | 207 | $tab->saveForm($request, $model); |
208 | 208 | } |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function onlyActive() |
14 | 14 | { |
15 | - return $this->filter(function ($element) { |
|
15 | + return $this->filter(function($element) { |
|
16 | 16 | if ($element instanceof FormElementInterface) { |
17 | - return ! $element->isReadonly(); |
|
17 | + return !$element->isReadonly(); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | return true; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function onlyVisible() |
28 | 28 | { |
29 | - return $this->filter(function ($element) { |
|
29 | + return $this->filter(function($element) { |
|
30 | 30 | if ($element instanceof FormElementInterface) { |
31 | 31 | return $element->isVisible(); |
32 | 32 | } |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function onlyActive() |
15 | 15 | { |
16 | - return $this->filter(function (TabInterface $tab) { |
|
16 | + return $this->filter(function(TabInterface $tab) { |
|
17 | 17 | $element = $tab->getContent(); |
18 | 18 | |
19 | 19 | if ($element instanceof FormElementInterface) { |
20 | - return ! $element->isReadonly(); |
|
20 | + return !$element->isReadonly(); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | return true; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function onlyVisible() |
31 | 31 | { |
32 | - return $this->filter(function (TabInterface $tab) { |
|
32 | + return $this->filter(function(TabInterface $tab) { |
|
33 | 33 | return $tab->isVisible(); |
34 | 34 | }); |
35 | 35 | } |
@@ -91,7 +91,7 @@ |
||
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 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function setOperator($operator) |
56 | 56 | { |
57 | - if (! array_key_exists($operator, $this->sqlOperators)) { |
|
57 | + if (!array_key_exists($operator, $this->sqlOperators)) { |
|
58 | 58 | throw new FilterOperatorException("Operator [$operator] not found"); |
59 | 59 | } |
60 | 60 | |
@@ -117,13 +117,13 @@ discard block |
||
117 | 117 | break; |
118 | 118 | case 'whereBetween': |
119 | 119 | case 'whereNotBetween': |
120 | - if (! is_array($value)) { |
|
120 | + if (!is_array($value)) { |
|
121 | 121 | $value = explode(',', $value, 2); |
122 | 122 | } |
123 | 123 | break; |
124 | 124 | case 'whereIn': |
125 | 125 | case 'whereNotIn': |
126 | - if (! is_array($value)) { |
|
126 | + if (!is_array($value)) { |
|
127 | 127 | $value = explode(',', $value); |
128 | 128 | } |
129 | 129 | break; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function fireDisplay() |
34 | 34 | { |
35 | - if (! method_exists($this, 'onDisplay')) { |
|
35 | + if (!method_exists($this, 'onDisplay')) { |
|
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function fireCreate() |
53 | 53 | { |
54 | - if (! method_exists($this, 'onCreate')) { |
|
54 | + if (!method_exists($this, 'onCreate')) { |
|
55 | 55 | return; |
56 | 56 | } |
57 | 57 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function fireEdit($id) |
80 | 80 | { |
81 | - if (! method_exists($this, 'onEdit')) { |
|
81 | + if (!method_exists($this, 'onEdit')) { |
|
82 | 82 | return; |
83 | 83 | } |
84 | 84 |