@@ -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 | } |
@@ -303,7 +303,7 @@ |
||
303 | 303 | * |
304 | 304 | * @param string $target |
305 | 305 | * |
306 | - * @return mixed |
|
306 | + * @return string |
|
307 | 307 | */ |
308 | 308 | protected function getClass($target): string |
309 | 309 | { |
@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function removeFilterByID($id) |
75 | 75 | { |
76 | - $this->filters = $this->filters->reject(function (AbstractFilter $filter) use ($id) { |
|
76 | + $this->filters = $this->filters->reject(function(AbstractFilter $filter) use ($id) { |
|
77 | 77 | return $filter->getId() == $id; |
78 | 78 | }); |
79 | 79 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | return true; |
67 | 67 | } |
68 | 68 | |
69 | - return $allowedMethods->map(function ($method) { |
|
69 | + return $allowedMethods->map(function($method) { |
|
70 | 70 | return strtoupper($method); |
71 | 71 | })->contains($method); |
72 | 72 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $this->value = $this->value->toArray(); |
14 | 14 | } |
15 | 15 | |
16 | - return collect((array) $this->value)->filter()->map(function ($path) use ($server, $width, $height) { |
|
16 | + return collect((array) $this->value)->filter()->map(function($path) use ($server, $width, $height) { |
|
17 | 17 | if (url()->isValidUrl($path) || strpos($path, 'data:image') === 0) { |
18 | 18 | $src = $path; |
19 | 19 | } elseif ($server) { |
@@ -184,7 +184,7 @@ |
||
184 | 184 | $attributes = array_merge($attributes, $this->attributes); |
185 | 185 | } |
186 | 186 | |
187 | - $attributes = collect($attributes)->map(function ($attribute, $name) { |
|
187 | + $attributes = collect($attributes)->map(function($attribute, $name) { |
|
188 | 188 | return "$name='$attribute'"; |
189 | 189 | })->implode(' '); |
190 | 190 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | $fields = \DB::getSchemaBuilder()->getColumnListing($table); |
90 | 90 | $fields = array_diff($fields, $exceptFields); |
91 | 91 | |
92 | - $array = \DB::table($table)->get($fields)->map(function ($item) { |
|
92 | + $array = \DB::table($table)->get($fields)->map(function($item) { |
|
93 | 93 | return (array) $item; |
94 | 94 | })->all(); |
95 | 95 |
@@ -640,7 +640,7 @@ |
||
640 | 640 | } |
641 | 641 | |
642 | 642 | /* Build row elements */ |
643 | - $template = array_reduce($fields, function ($all, $field) { |
|
643 | + $template = array_reduce($fields, function($all, $field) { |
|
644 | 644 | $all .= "<td>{$field}</td>"; |
645 | 645 | |
646 | 646 | return $all; |
@@ -112,7 +112,7 @@ |
||
112 | 112 | protected function startColumn() |
113 | 113 | { |
114 | 114 | // get class name using width array |
115 | - $classnName = collect($this->width)->map(function ($value, $key) { |
|
115 | + $classnName = collect($this->width)->map(function($value, $key) { |
|
116 | 116 | return "col-$key-$value"; |
117 | 117 | })->implode(' '); |
118 | 118 |
@@ -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 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $method = $this->http_method; |
71 | 71 | |
72 | - $matches = array_map(function ($path) use ($method) { |
|
72 | + $matches = array_map(function($path) use ($method) { |
|
73 | 73 | $path = trim(config('admin.route.prefix'), '/').$path; |
74 | 74 | |
75 | 75 | if (Str::contains($path, ':')) { |
@@ -115,16 +115,16 @@ discard block |
||
115 | 115 | if ($match['path'] == '/') { |
116 | 116 | $path = '/'; |
117 | 117 | } else { |
118 | - $match_pattern = preg_replace('/(?<!\\\\)\//i','\/', $match['path']); |
|
118 | + $match_pattern = preg_replace('/(?<!\\\\)\//i', '\/', $match['path']); |
|
119 | 119 | $path = trim($match['path'], '/'); |
120 | 120 | } |
121 | 121 | |
122 | 122 | |
123 | - if (!$request->is($path) && (!is_null($match_pattern) && !preg_match("/".$match_pattern."/", $request->fullUrl())) ) { |
|
123 | + if (!$request->is($path) && (!is_null($match_pattern) && !preg_match("/".$match_pattern."/", $request->fullUrl()))) { |
|
124 | 124 | return false; |
125 | 125 | } |
126 | 126 | |
127 | - $method = collect($match['method'])->filter()->map(function ($method) { |
|
127 | + $method = collect($match['method'])->filter()->map(function($method) { |
|
128 | 128 | return strtoupper($method); |
129 | 129 | }); |
130 | 130 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | { |
165 | 165 | parent::boot(); |
166 | 166 | |
167 | - static::deleting(function ($model) { |
|
167 | + static::deleting(function($model) { |
|
168 | 168 | $model->roles()->detach(); |
169 | 169 | }); |
170 | 170 | } |