We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -59,6 +59,9 @@ discard block |
||
59 | 59 | $this->addButton($stack, $name, 'model_function', $model_function_name, $position); |
60 | 60 | } |
61 | 61 | |
62 | + /** |
|
63 | + * @param string $view |
|
64 | + */ |
|
62 | 65 | public function addButtonFromView($stack, $name, $view, $position = false) |
63 | 66 | { |
64 | 67 | if (! view()->exists($view)) { |
@@ -130,6 +133,9 @@ discard block |
||
130 | 133 | $this->buttons = collect([]); |
131 | 134 | } |
132 | 135 | |
136 | + /** |
|
137 | + * @param string $stack |
|
138 | + */ |
|
133 | 139 | public function removeAllButtonsFromStack($stack) |
134 | 140 | { |
135 | 141 | $this->buttons = $this->buttons->reject(function ($button) use ($stack) { |
@@ -152,6 +158,12 @@ discard block |
||
152 | 158 | public $type = 'view'; |
153 | 159 | public $content; |
154 | 160 | |
161 | + /** |
|
162 | + * @param string $stack |
|
163 | + * @param string $name |
|
164 | + * @param string $type |
|
165 | + * @param string $content |
|
166 | + */ |
|
155 | 167 | public function __construct($stack, $name, $type, $content) |
156 | 168 | { |
157 | 169 | $this->stack = $stack; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function addButtonFromView($stack, $name, $view, $position = false) |
63 | 63 | { |
64 | - if (! view()->exists($view)) { |
|
64 | + if (!view()->exists($view)) { |
|
65 | 65 | $view = 'crud::buttons.'.$view; |
66 | 66 | } |
67 | 67 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $button = $this->buttons()->firstWhere('name', $name); |
101 | 101 | |
102 | - if (! $button) { |
|
102 | + if (!$button) { |
|
103 | 103 | abort(500, 'CRUD Button "'.$name.'" not found. Please check the button exists before you modify it.'); |
104 | 104 | } |
105 | 105 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function removeButton($name, $stack = null) |
122 | 122 | { |
123 | - $this->buttons = $this->buttons->reject(function ($button) use ($name, $stack) { |
|
123 | + $this->buttons = $this->buttons->reject(function($button) use ($name, $stack) { |
|
124 | 124 | return $stack == null ? $button->name == $name : ($button->stack == $stack) && ($button->name == $name); |
125 | 125 | }); |
126 | 126 | } |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | |
133 | 133 | public function removeAllButtonsFromStack($stack) |
134 | 134 | { |
135 | - $this->buttons = $this->buttons->reject(function ($button) use ($stack) { |
|
135 | + $this->buttons = $this->buttons->reject(function($button) use ($stack) { |
|
136 | 136 | return $button->stack == $stack; |
137 | 137 | }); |
138 | 138 | } |
139 | 139 | |
140 | 140 | public function removeButtonFromStack($name, $stack) |
141 | 141 | { |
142 | - $this->buttons = $this->buttons->reject(function ($button) use ($name, $stack) { |
|
142 | + $this->buttons = $this->buttons->reject(function($button) use ($name, $stack) { |
|
143 | 143 | return $button->name == $name && $button->stack == $stack; |
144 | 144 | }); |
145 | 145 | } |