@@ -54,22 +54,22 @@ |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | $groupedBlocks = $this->widgets |
57 | - ->map(function ($class) { |
|
57 | + ->map(function($class) { |
|
58 | 58 | return $this->makeWidget($class); |
59 | 59 | }) |
60 | - ->filter(function (WidgetInterface $block) { |
|
60 | + ->filter(function(WidgetInterface $block) { |
|
61 | 61 | return $block->active(); |
62 | 62 | }) |
63 | - ->groupBy(function (WidgetInterface $block) { |
|
63 | + ->groupBy(function(WidgetInterface $block) { |
|
64 | 64 | return $block->template(); |
65 | 65 | }); |
66 | 66 | |
67 | 67 | foreach ($groupedBlocks as $template => $widgets) { |
68 | - $factory->composer($template, function (View $view) use ($widgets) { |
|
68 | + $factory->composer($template, function(View $view) use ($widgets) { |
|
69 | 69 | $factory = $view->getFactory(); |
70 | 70 | |
71 | 71 | /** @var Collection|WidgetInterface[] $widgets */ |
72 | - $widgets = $widgets->sortBy(function (WidgetInterface $block) { |
|
72 | + $widgets = $widgets->sortBy(function(WidgetInterface $block) { |
|
73 | 73 | return $block->position(); |
74 | 74 | }); |
75 | 75 |
@@ -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; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getEditor($editorId) |
69 | 69 | { |
70 | - return $this->getFilters()->filter(function (WysiwygEditorInterface $editor) use ($editorId) { |
|
70 | + return $this->getFilters()->filter(function(WysiwygEditorInterface $editor) use ($editorId) { |
|
71 | 71 | return $editor->getId() == $editorId; |
72 | 72 | })->first(); |
73 | 73 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function loadEditor($editorId) |
86 | 86 | { |
87 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
87 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
88 | 88 | if ($editor->isUsed()) { |
89 | 89 | return true; |
90 | 90 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function applyFilter($editorId, $text) |
106 | 106 | { |
107 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
107 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
108 | 108 | return $editor->applyFilter($text); |
109 | 109 | } |
110 | 110 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return; |
70 | 70 | } |
71 | 71 | |
72 | - if (! is_null($userClass::where('email', $email)->first())) { |
|
72 | + if (!is_null($userClass::where('email', $email)->first())) { |
|
73 | 73 | $this->error("User with same email [{$email}] exists."); |
74 | 74 | |
75 | 75 | return; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | $confirm = $this->confirm("Are you sure want to delete user with id [{$id}]?", false); |
123 | - if (! $confirm) { |
|
123 | + if (!$confirm) { |
|
124 | 124 | return; |
125 | 125 | } |
126 | 126 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | */ |
130 | 130 | public function setValidationRules($validationRules) |
131 | 131 | { |
132 | - if (! is_array($validationRules)) { |
|
132 | + if (!is_array($validationRules)) { |
|
133 | 133 | $validationRules = func_get_args(); |
134 | 134 | } |
135 | 135 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | $this->view = $view; |
48 | 48 | |
49 | - $this->setDisplay(function ($model) { |
|
49 | + $this->setDisplay(function($model) { |
|
50 | 50 | $this->data['model'] = $model; |
51 | 51 | |
52 | 52 | return view($this->getView(), $this->data); |