@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | public static function fromKeys($keys) |
21 | 21 | { |
22 | - $keys = (array) $keys; |
|
22 | + $keys = (array)$keys; |
|
23 | 23 | $collection = collect(); |
24 | 24 | |
25 | 25 | /** @var Managers */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public static function fromTags($tags) |
35 | 35 | { |
36 | - $tags = (array) $tags; |
|
36 | + $tags = (array)$tags; |
|
37 | 37 | $collection = collect(); |
38 | 38 | |
39 | 39 | /** @var Managers */ |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | |
53 | 53 | private static function fromManagers(Collection $collection) |
54 | 54 | { |
55 | - return new static(...$collection->reject(function ($manager) { |
|
55 | + return new static(...$collection->reject(function($manager) { |
|
56 | 56 | return !$manager->can('index'); |
57 | - })->map(function ($manager) { |
|
57 | + })->map(function($manager) { |
|
58 | 58 | return new NavItem($manager->details()->plural, $manager->route('index'), [ |
59 | 59 | 'key' => $manager->details()->key, |
60 | 60 | 'tags' => app(Register::class)->filterByKey($manager->details()->key)->first()->tags() |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | public function rejectKeys($keys) |
66 | 66 | { |
67 | - $keys = (array) $keys; |
|
67 | + $keys = (array)$keys; |
|
68 | 68 | |
69 | 69 | foreach ($this->items as $k => $item) { |
70 | 70 | if (in_array($item->details('key', ''), $keys)) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function rejectTags($tags) |
79 | 79 | { |
80 | - $tags = (array) $tags; |
|
80 | + $tags = (array)$tags; |
|
81 | 81 | |
82 | 82 | foreach ($this->items as $k => $item) { |
83 | 83 | if (count(array_intersect($item->details('tags', []), $tags)) > 0) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $output = ''; |
120 | 120 | |
121 | 121 | foreach ($this->items as $item) { |
122 | - $output .= '<a class="' . (isActiveUrl($item->url()) ? 'active' : '') . '" href="'.$item->url().'">'; |
|
122 | + $output .= '<a class="'.(isActiveUrl($item->url()) ? 'active' : '').'" href="'.$item->url().'">'; |
|
123 | 123 | $output .= $title ?? ucfirst($item->title()); |
124 | 124 | $output .= '</a>'; |
125 | 125 | } |
@@ -146,14 +146,14 @@ discard block |
||
146 | 146 | |
147 | 147 | $items = ''; |
148 | 148 | foreach ($this->items as $item) { |
149 | - $items .= '<a class="' . (isActiveUrl($item->url()) ? 'active' : '') . '" href="'.$item->url().'">'; |
|
149 | + $items .= '<a class="'.(isActiveUrl($item->url()) ? 'active' : '').'" href="'.$item->url().'">'; |
|
150 | 150 | $items .= ucfirst($item->title()); |
151 | 151 | $items .= '</a>'; |
152 | 152 | } |
153 | 153 | |
154 | 154 | // Surround within vue dropdown |
155 | 155 | $output = '<dropdown>'; |
156 | - $output .= '<span class="center-y nav-item" slot="trigger" slot-scope="{ toggle, isActive }" @click="toggle">'. ($title ?? 'Collecties') .'</span>'; |
|
156 | + $output .= '<span class="center-y nav-item" slot="trigger" slot-scope="{ toggle, isActive }" @click="toggle">'.($title ?? 'Collecties').'</span>'; |
|
157 | 157 | $output .= '<div v-cloak class="dropdown-box inset-s">'; |
158 | 158 | $output .= $items; |
159 | 159 | $output .= '</div>'; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | { |
54 | 54 | foreach ($flatReferences as $locale => $flatReferenceString) { |
55 | 55 | if (!$flatReferenceString) { |
56 | - throw new \InvalidArgumentException('Homepage setting value cannot be empty. Value for locale ' . $locale . ' is missing.'); |
|
56 | + throw new \InvalidArgumentException('Homepage setting value cannot be empty. Value for locale '.$locale.' is missing.'); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // prepend the name with the expected trans.<locale>. string |
28 | 28 | $localizedAttr = (false !== strpos($attr, ':locale')) |
29 | 29 | ? str_replace(':locale', $locale, $attr) |
30 | - : 'trans.' . $locale . '.' . $attr; |
|
30 | + : 'trans.'.$locale.'.'.$attr; |
|
31 | 31 | |
32 | 32 | $localizedAttr = $this->replaceBracketsByDots($localizedAttr); |
33 | 33 | |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function influenceByPayload(array $data) |
51 | 51 | { |
52 | - if (! isset($data['trans'])) { |
|
52 | + if (!isset($data['trans'])) { |
|
53 | 53 | return $this; |
54 | 54 | } |
55 | 55 | |
56 | 56 | // Remove locales that are considered empty in the request payload |
57 | 57 | foreach ($data['trans'] as $locale => $values) { |
58 | - if ($locale == $this->defaultLocale || ! is_array_empty($values)) { |
|
58 | + if ($locale == $this->defaultLocale || !is_array_empty($values)) { |
|
59 | 59 | continue; |
60 | 60 | } |
61 | 61 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public static function redirectsFromModel(ProvidesUrl $model) |
20 | 20 | { |
21 | - $records = MemoizedUrlRecord::getByModel($model)->reject(function ($record) { |
|
21 | + $records = MemoizedUrlRecord::getByModel($model)->reject(function($record) { |
|
22 | 22 | return !$record->isRedirect(); |
23 | 23 | })->sortByDesc('created_at'); |
24 | 24 | |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | $fields = new static([]); |
61 | 61 | |
62 | 62 | foreach ($locales as $locale) { |
63 | - $fields['url-slugs.' . $locale] = UrlSlugField::make('url-slugs.' . $locale) |
|
63 | + $fields['url-slugs.'.$locale] = UrlSlugField::make('url-slugs.'.$locale) |
|
64 | 64 | ->setBaseUrlSegment($model->baseUrlSegment($locale)) |
65 | - ->prepend($model->resolveUrl($locale, $model->baseUrlSegment($locale)) .'/') |
|
66 | - ->name('url-slugs[' . $locale . ']') |
|
65 | + ->prepend($model->resolveUrl($locale, $model->baseUrlSegment($locale)).'/') |
|
66 | + ->name('url-slugs['.$locale.']') |
|
67 | 67 | ->label($locale); |
68 | 68 | } |
69 | 69 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | private static function fillWithExistingValues(ProvidesUrl $model, self $fields): void |
78 | 78 | { |
79 | - $records = UrlRecord::getByModel($model)->reject(function ($record) { |
|
79 | + $records = UrlRecord::getByModel($model)->reject(function($record) { |
|
80 | 80 | return $record->isRedirect(); |
81 | 81 | })->sortBy('locale'); |
82 | 82 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $fields['url-slugs.'.$record->locale] |
89 | 89 | ->setUrlRecord($record) |
90 | 90 | ->setBaseUrlSegment($model->baseUrlSegment($record->locale)) |
91 | - ->prepend($model->resolveUrl($record->locale, $model->baseUrlSegment($record->locale)) .'/'); |
|
91 | + ->prepend($model->resolveUrl($record->locale, $model->baseUrlSegment($record->locale)).'/'); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | private function addFiles(HasMedia $model, string $type, array $files, array &$files_order, string $locale = null) |
52 | 52 | { |
53 | - if(!$this->actionExists($files, 'new')) return; |
|
53 | + if (!$this->actionExists($files, 'new')) return; |
|
54 | 54 | |
55 | 55 | foreach ($files['new'] as $id => $file) { |
56 | 56 | if (!$file) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | private function replaceFiles(HasMedia $model, array $files) |
70 | 70 | { |
71 | - if(!$this->actionExists($files, 'replace')) return; |
|
71 | + if (!$this->actionExists($files, 'replace')) return; |
|
72 | 72 | |
73 | 73 | foreach ($files['replace'] as $id => $file) { |
74 | 74 | if (!$file) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function removeFiles(HasMedia $model, array $files) |
88 | 88 | { |
89 | - if(!$this->actionExists($files, 'delete')) return; |
|
89 | + if (!$this->actionExists($files, 'delete')) return; |
|
90 | 90 | |
91 | 91 | foreach ($model->assets()->whereIn('id', $files['delete'])->get() as $asset) { |
92 | 92 | $asset->delete(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if (is_string($file)) { |
104 | 104 | $image_name = json_decode($file)->output->name; |
105 | 105 | $asset = $this->addAsset(json_decode($file)->output->image, $type, $locale, $image_name, $model); |
106 | - } else { |
|
106 | + }else { |
|
107 | 107 | $image_name = $file->getClientOriginalName(); |
108 | 108 | $asset = $this->addAsset($file, $type, $locale, $image_name, $model); |
109 | 109 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | if (is_string($file)) { |
128 | 128 | $asset = AssetUploader::uploadFromBase64($file, $filename); |
129 | - } else { |
|
129 | + }else { |
|
130 | 130 | $asset = AssetUploader::upload($file, $filename); |
131 | 131 | } |
132 | 132 | |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function sluggifyFilename($filename): string |
145 | 145 | { |
146 | - $extension = substr($filename, strrpos($filename, '.') + 1); |
|
146 | + $extension = substr($filename, strrpos($filename, '.')+1); |
|
147 | 147 | $filename = substr($filename, 0, strrpos($filename, '.')); |
148 | - $filename = str_slug($filename) . '.' . $extension; |
|
148 | + $filename = str_slug($filename).'.'.$extension; |
|
149 | 149 | |
150 | 150 | return $filename; |
151 | 151 | } |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | if ($file instanceof UploadedFile && !$file->isValid()) { |
162 | 162 | if ($file->getError() == UPLOAD_ERR_INI_SIZE) { |
163 | 163 | throw new FileTooBigException( |
164 | - 'Cannot upload file because it exceeded the allowed upload_max_filesize: upload_max_filesize is smaller than post size. ' . |
|
165 | - 'upload_max_filesize: ' . (int)ini_get('upload_max_filesize') . 'MB, ' . |
|
166 | - 'post_max_size: ' . (int)(ini_get('post_max_size')) . 'MB' |
|
164 | + 'Cannot upload file because it exceeded the allowed upload_max_filesize: upload_max_filesize is smaller than post size. '. |
|
165 | + 'upload_max_filesize: '.(int)ini_get('upload_max_filesize').'MB, '. |
|
166 | + 'post_max_size: '.(int)(ini_get('post_max_size')).'MB' |
|
167 | 167 | ); |
168 | 168 | } |
169 | 169 | } |
@@ -178,16 +178,16 @@ discard block |
||
178 | 178 | foreach ($files_by_type as $type => $files) { |
179 | 179 | foreach ($files as $locale => $_files) { |
180 | 180 | if (!in_array($locale, config('translatable.locales'))) { |
181 | - throw new \InvalidArgumentException('Corrupt file payload. key is expected to be a valid locale [' . implode(',', config('translatable.locales', [])). ']. Instead [' . $locale . '] is given.'); |
|
181 | + throw new \InvalidArgumentException('Corrupt file payload. key is expected to be a valid locale ['.implode(',', config('translatable.locales', [])).']. Instead ['.$locale.'] is given.'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | if (!is_array($_files)) { |
185 | - throw new \InvalidArgumentException('A valid files entry should be an array of files, key with either [new, replace or delete]. Instead a ' . gettype($_files) . ' is given.'); |
|
185 | + throw new \InvalidArgumentException('A valid files entry should be an array of files, key with either [new, replace or delete]. Instead a '.gettype($_files).' is given.'); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | foreach ($_files as $action => $file) { |
189 | 189 | if (!in_array($action, $actions)) { |
190 | - throw new \InvalidArgumentException('A valid files entry should have a key of either ['.implode(',', $actions).']. Instead ' . $action . ' is given.'); |
|
190 | + throw new \InvalidArgumentException('A valid files entry should have a key of either ['.implode(',', $actions).']. Instead '.$action.' is given.'); |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | foreach ($files_order_by_type as $type => $fileIdsCollection) { |
197 | 197 | foreach ($fileIdsCollection as $locale => $commaSeparatedFileIds) { |
198 | 198 | if (!in_array($locale, config('translatable.locales'))) { |
199 | - throw new \InvalidArgumentException('Corrupt file payload. key for the file order is expected to be a valid locale [' . implode(',', config('translatable.locales', [])). ']. Instead [' . $locale . '] is given.'); |
|
199 | + throw new \InvalidArgumentException('Corrupt file payload. key for the file order is expected to be a valid locale ['.implode(',', config('translatable.locales', [])).']. Instead ['.$locale.'] is given.'); |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 | } |
@@ -50,7 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | private function addFiles(HasMedia $model, string $type, array $files, array &$files_order, string $locale = null) |
52 | 52 | { |
53 | - if(!$this->actionExists($files, 'new')) return; |
|
53 | + if(!$this->actionExists($files, 'new')) { |
|
54 | + return; |
|
55 | + } |
|
54 | 56 | |
55 | 57 | foreach ($files['new'] as $id => $file) { |
56 | 58 | if (!$file) { |
@@ -68,7 +70,9 @@ discard block |
||
68 | 70 | */ |
69 | 71 | private function replaceFiles(HasMedia $model, array $files) |
70 | 72 | { |
71 | - if(!$this->actionExists($files, 'replace')) return; |
|
73 | + if(!$this->actionExists($files, 'replace')) { |
|
74 | + return; |
|
75 | + } |
|
72 | 76 | |
73 | 77 | foreach ($files['replace'] as $id => $file) { |
74 | 78 | if (!$file) { |
@@ -86,7 +90,9 @@ discard block |
||
86 | 90 | */ |
87 | 91 | private function removeFiles(HasMedia $model, array $files) |
88 | 92 | { |
89 | - if(!$this->actionExists($files, 'delete')) return; |
|
93 | + if(!$this->actionExists($files, 'delete')) { |
|
94 | + return; |
|
95 | + } |
|
90 | 96 | |
91 | 97 | foreach ($model->assets()->whereIn('id', $files['delete'])->get() as $asset) { |
92 | 98 | $asset->delete(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | private function removeExistingSets() |
92 | 92 | { |
93 | 93 | foreach ($this->model->children() as $instance) { |
94 | - if (! $instance instanceof StoredSetReference) { |
|
94 | + if (!$instance instanceof StoredSetReference) { |
|
95 | 95 | continue; |
96 | 96 | } |
97 | 97 | $this->model->rejectChild($instance); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | foreach ($this->text_modules['replace'] as $text_module) { |
148 | - if (! $module = FlatReferenceFactory::fromString($text_module['id'])->instance()) { |
|
148 | + if (!$module = FlatReferenceFactory::fromString($text_module['id'])->instance()) { |
|
149 | 149 | continue; |
150 | 150 | } |
151 | 151 | |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | continue; |
156 | 156 | } |
157 | 157 | |
158 | - foreach($text_module['trans'] as $locale => $content) |
|
158 | + foreach ($text_module['trans'] as $locale => $content) |
|
159 | 159 | { |
160 | 160 | $purifier = new HTMLPurifier(); |
161 | - $sanitized_text = $purifier->purify( $content['content'] ); |
|
161 | + $sanitized_text = $purifier->purify($content['content']); |
|
162 | 162 | |
163 | 163 | $text_module['trans'][$locale]['content'] = $sanitized_text; |
164 | 164 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | private function removeTextualModule($module) |
174 | 174 | { |
175 | - if (! $module instanceof TextModule && ! $module instanceof PagetitleModule) { |
|
175 | + if (!$module instanceof TextModule && !$module instanceof PagetitleModule) { |
|
176 | 176 | throw new \Exception('Invalid request to remove non textual module'); |
177 | 177 | } |
178 | 178 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | continue; |
195 | 195 | } |
196 | 196 | |
197 | - $child = $children->first(function ($c) use ($reference) { |
|
197 | + $child = $children->first(function($c) use ($reference) { |
|
198 | 198 | return $c->flatReference()->get() == $reference; |
199 | 199 | }); |
200 | 200 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | private function stripTagsBlacklist($value, $blacklist = []) |
246 | 246 | { |
247 | 247 | foreach ($blacklist as $tag) { |
248 | - $value = preg_replace('/<\/?' . $tag . '(.|\s)*?>/', '', $value); |
|
248 | + $value = preg_replace('/<\/?'.$tag.'(.|\s)*?>/', '', $value); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $value; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $empty = true; |
75 | 75 | |
76 | 76 | foreach ($values as $value) { |
77 | - if (! $value || !trim($value)) { |
|
77 | + if (!$value || !trim($value)) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | $empty = false; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | -if (! function_exists('contract')) { |
|
87 | +if (!function_exists('contract')) { |
|
88 | 88 | function contract($instance, $contract) |
89 | 89 | { |
90 | 90 | return $instance instanceof $contract; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $text = cleanupHTML($text, $clean); |
114 | 114 | } |
115 | 115 | $teaser = substr($text, 0, $max); |
116 | - return strlen($text) <= $max ? $teaser : $teaser . $ending; |
|
116 | + return strlen($text) <= $max ? $teaser : $teaser.$ending; |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | } |
167 | 167 | // // cleanup HTML and any unwanted attributes |
168 | 168 | $purifier = new HTMLPurifier(); |
169 | - $value = $purifier->purify( $value ); |
|
169 | + $value = $purifier->purify($value); |
|
170 | 170 | |
171 | 171 | /** |
172 | 172 | * htmlPurifier converts characters to their encode equivalents. This is something |
173 | 173 | * that we need to reverse after the htmlPurifier cleanup. |
174 | 174 | */ |
175 | - $value = str_replace('&', '&', $value); |
|
175 | + $value = str_replace('&', '&', $value); |
|
176 | 176 | |
177 | 177 | return $value; |
178 | 178 | } |
@@ -240,16 +240,16 @@ discard block |
||
240 | 240 | 'scheme', 'host', 'port', 'path', 'query', 'fragment' |
241 | 241 | ], null), $parsed_url, $overrides); |
242 | 242 | |
243 | - $scheme = $parsed_url['scheme'] ? $parsed_url['scheme'] . '://' : null; |
|
244 | - $port = $parsed_url['port'] ? ':' . $parsed_url['port'] : null; |
|
245 | - $fragment = $parsed_url['fragment'] ? '#' . $parsed_url['fragment'] : null; |
|
243 | + $scheme = $parsed_url['scheme'] ? $parsed_url['scheme'].'://' : null; |
|
244 | + $port = $parsed_url['port'] ? ':'.$parsed_url['port'] : null; |
|
245 | + $fragment = $parsed_url['fragment'] ? '#'.$parsed_url['fragment'] : null; |
|
246 | 246 | |
247 | - $baseurl = $scheme . $parsed_url['host'] . $port . $parsed_url['path']; |
|
247 | + $baseurl = $scheme.$parsed_url['host'].$port.$parsed_url['path']; |
|
248 | 248 | $current_query = []; |
249 | 249 | |
250 | 250 | $_query = explode('&', $parsed_url['query']); |
251 | 251 | |
252 | - array_map(function ($v) use (&$current_query) { |
|
252 | + array_map(function($v) use (&$current_query) { |
|
253 | 253 | if (!$v) { |
254 | 254 | return; |
255 | 255 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | $query = urldecode(http_build_query(array_merge($current_query, $query_params))); |
269 | 269 | |
270 | - return $baseurl . '?' . $query . $fragment; |
|
270 | + return $baseurl.'?'.$query.$fragment; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | |
@@ -276,9 +276,9 @@ discard block |
||
276 | 276 | { |
277 | 277 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
278 | 278 | if (php_sapi_name() == 'cli') { |
279 | - print_r("\e[1;30m dumped at: " . str_replace(base_path(), '', $trace[0]['file']). ", line: " . $trace[0]['line'] . "\e[40m\n"); |
|
280 | - } else { |
|
281 | - print_r("[dumped at: " . str_replace(base_path(), '', $trace[0]['file']). ", line: " . $trace[0]['line'] . "]\n"); |
|
279 | + print_r("\e[1;30m dumped at: ".str_replace(base_path(), '', $trace[0]['file']).", line: ".$trace[0]['line']."\e[40m\n"); |
|
280 | + }else { |
|
281 | + print_r("[dumped at: ".str_replace(base_path(), '', $trace[0]['file']).", line: ".$trace[0]['line']."]\n"); |
|
282 | 282 | } |
283 | 283 | return dd($var, ...$moreVars); |
284 | 284 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $builder->orderBy('updated_at', 'DESC'); |
81 | 81 | } |
82 | 82 | |
83 | - return $builder->get()->map(function ($model) { |
|
83 | + return $builder->get()->map(function($model) { |
|
84 | 84 | return (new static($this->registration))->manage($model); |
85 | 85 | }); |
86 | 86 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | public function guard($verb): Manager |
150 | 150 | { |
151 | - if (! $this->can($verb)) { |
|
151 | + if (!$this->can($verb)) { |
|
152 | 152 | NotAllowedManagerRoute::notAllowedVerb($verb, $this); |
153 | 153 | } |
154 | 154 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $fields = $this->fields(); |
172 | 172 | |
173 | 173 | foreach ($this->assistants() as $assistant) { |
174 | - if (! method_exists($assistant, 'fields')) { |
|
174 | + if (!method_exists($assistant, 'fields')) { |
|
175 | 175 | continue; |
176 | 176 | } |
177 | 177 |
@@ -17,11 +17,11 @@ |
||
17 | 17 | public function enabledAsLabel(): string |
18 | 18 | { |
19 | 19 | // Avoid showing enabled state if there is an invitation pending |
20 | - if ($this->user->invitation->last()){ |
|
20 | + if ($this->user->invitation->last()) { |
|
21 | 21 | $state = $this->user->invitation->last()->state(); |
22 | - if($state == 'pending') { |
|
22 | + if ($state == 'pending') { |
|
23 | 23 | return '<span class="label label-primary">Uitgenodigd</span>'; |
24 | - }elseif($state == 'denied'){ |
|
24 | + }elseif ($state == 'denied') { |
|
25 | 25 | return '<span class="label label-error">Geblokkeerd</span>'; |
26 | 26 | } |
27 | 27 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $state = $this->user->invitation->last()->state(); |
22 | 22 | if($state == 'pending') { |
23 | 23 | return '<span class="label label-primary">Uitgenodigd</span>'; |
24 | - }elseif($state == 'denied'){ |
|
24 | + } elseif($state == 'denied'){ |
|
25 | 25 | return '<span class="label label-error">Geblokkeerd</span>'; |
26 | 26 | } |
27 | 27 | } |