@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function display($style = 'primary', $size = 'sm', $max = 100) |
8 | 8 | { |
9 | - $style = collect((array) $style)->map(function ($style) { |
|
9 | + $style = collect((array) $style)->map(function($style) { |
|
10 | 10 | return 'progress-bar-'.$style; |
11 | 11 | })->implode(' '); |
12 | 12 |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | protected function prepareValue($key, $record) |
163 | 163 | { |
164 | - $field = $this->fields->first(function (Field $field) use ($key) { |
|
164 | + $field = $this->fields->first(function(Field $field) use ($key) { |
|
165 | 165 | return in_array($key, (array) $field->column()); |
166 | 166 | }); |
167 | 167 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | if (array_key_exists($key, $this->original)) { |
185 | 185 | $values = $this->original[$key]; |
186 | 186 | |
187 | - $this->fields->each(function (Field $field) use ($values) { |
|
187 | + $this->fields->each(function(Field $field) use ($values) { |
|
188 | 188 | $field->setOriginal($values); |
189 | 189 | }); |
190 | 190 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function fill(array $data) |
201 | 201 | { |
202 | - $this->fields->each(function (Field $field) use ($data) { |
|
202 | + $this->fields->each(function(Field $field) use ($data) { |
|
203 | 203 | $field->fill($data); |
204 | 204 | }); |
205 | 205 |
@@ -103,7 +103,7 @@ |
||
103 | 103 | protected function initBranchCallback() |
104 | 104 | { |
105 | 105 | if (is_null($this->branchCallback)) { |
106 | - $this->branchCallback = function ($branch) { |
|
106 | + $this->branchCallback = function($branch) { |
|
107 | 107 | $key = $branch[$this->model->getKeyName()]; |
108 | 108 | $title = $branch[$this->model->getTitleColumn()]; |
109 | 109 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function respond(Response $response) |
49 | 49 | { |
50 | - $next = function () use ($response) { |
|
50 | + $next = function() use ($response) { |
|
51 | 51 | return $response; |
52 | 52 | }; |
53 | 53 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | protected function decodeUtf8HtmlEntities($html) |
141 | 141 | { |
142 | - return preg_replace_callback('/(&#[0-9]+;)/', function ($html) { |
|
142 | + return preg_replace_callback('/(&#[0-9]+;)/', function($html) { |
|
143 | 143 | return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES'); |
144 | 144 | }, $html); |
145 | 145 | } |
@@ -331,7 +331,7 @@ |
||
331 | 331 | * |
332 | 332 | * @param Presenter $presenter |
333 | 333 | * |
334 | - * @return mixed |
|
334 | + * @return Presenter |
|
335 | 335 | */ |
336 | 336 | protected function setPresenter(Presenter $presenter) |
337 | 337 | { |
@@ -475,7 +475,7 @@ |
||
475 | 475 | $relation = substr($this->column, 0, strrpos($this->column, '.')); |
476 | 476 | $args[0] = last(explode('.', $this->column)); |
477 | 477 | |
478 | - return ['whereHas' => [$relation, function ($relation) use ($args) { |
|
478 | + return ['whereHas' => [$relation, function($relation) use ($args) { |
|
479 | 479 | call_user_func_array([$relation, $this->query], $args); |
480 | 480 | }]]; |
481 | 481 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | return ''; |
71 | 71 | } |
72 | 72 | |
73 | - return $this->elements[$part]->map(function ($element) { |
|
73 | + return $this->elements[$part]->map(function($element) { |
|
74 | 74 | if ($element instanceof Htmlable) { |
75 | 75 | return $element->toHtml(); |
76 | 76 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * |
39 | 39 | * @param array|callable|string $options |
40 | 40 | * |
41 | - * @return $this|mixed |
|
41 | + * @return Select |
|
42 | 42 | */ |
43 | 43 | public function options($options = []) |
44 | 44 | { |
@@ -105,7 +105,7 @@ |
||
105 | 105 | throw new \InvalidArgumentException("[$model] must be a valid model class"); |
106 | 106 | } |
107 | 107 | |
108 | - $this->options = function ($value) use ($model, $idField, $textField) { |
|
108 | + $this->options = function($value) use ($model, $idField, $textField) { |
|
109 | 109 | if (empty($value)) { |
110 | 110 | return []; |
111 | 111 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | { |
87 | 87 | parent::boot(); |
88 | 88 | |
89 | - static::deleting(function ($model) { |
|
89 | + static::deleting(function($model) { |
|
90 | 90 | $model->administrators()->detach(); |
91 | 91 | |
92 | 92 | $model->permissions()->detach(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $method = $this->http_method; |
68 | 68 | |
69 | - $matches = array_map(function ($path) use ($method) { |
|
69 | + $matches = array_map(function($path) use ($method) { |
|
70 | 70 | $path = trim(config('admin.route.prefix'), '/').$path; |
71 | 71 | |
72 | 72 | if (Str::contains($path, ':')) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | return false; |
101 | 101 | } |
102 | 102 | |
103 | - $method = collect($match['method'])->filter()->map(function ($method) { |
|
103 | + $method = collect($match['method'])->filter()->map(function($method) { |
|
104 | 104 | return strtoupper($method); |
105 | 105 | }); |
106 | 106 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | parent::boot(); |
142 | 142 | |
143 | - static::deleting(function ($model) { |
|
143 | + static::deleting(function($model) { |
|
144 | 144 | $model->roles()->detach(); |
145 | 145 | }); |
146 | 146 | } |
@@ -91,7 +91,7 @@ |
||
91 | 91 | * |
92 | 92 | * @param string $path |
93 | 93 | * |
94 | - * @return mixed |
|
94 | + * @return string |
|
95 | 95 | */ |
96 | 96 | public function getHttpPathAttribute($path) |
97 | 97 | { |