@@ -17,7 +17,7 @@ |
||
| 17 | 17 | collect($file)->each(function ($media) use ($optimizerChain) { |
| 18 | 18 | $optimizerChain->optimize($media->getPathname()); |
| 19 | 19 | }); |
| 20 | - }else{ |
|
| 20 | + } else{ |
|
| 21 | 21 | $optimizerChain->optimize($file->getPathname()); |
| 22 | 22 | } |
| 23 | 23 | }); |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | // Paths should be given relative to the manifestpath so make sure to remove the basepath |
| 38 | 38 | return asset( mix($entry.'/test', $manifestPath) ); |
| 39 | - } |
|
| 40 | - catch(\Exception $e) |
|
| 39 | + } catch(\Exception $e) |
|
| 41 | 40 | { |
| 42 | 41 | \Illuminate\Support\Facades\Log::error($e); |
| 43 | 42 | |
@@ -29,7 +29,9 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | private function assignPermissionsToRole(Role $role) |
| 31 | 31 | { |
| 32 | - if(!$this->option('permissions')) return; |
|
| 32 | + if(!$this->option('permissions')) { |
|
| 33 | + return; |
|
| 34 | + } |
|
| 33 | 35 | |
| 34 | 36 | $permissionNames = explode(',', $this->option('permissions')); |
| 35 | 37 | |
@@ -49,7 +51,9 @@ discard block |
||
| 49 | 51 | } |
| 50 | 52 | |
| 51 | 53 | foreach($cleanPermissionNames as $cleanPermissionName){ |
| 52 | - if($role->hasPermissionTo($cleanPermissionName)) continue; |
|
| 54 | + if($role->hasPermissionTo($cleanPermissionName)) { |
|
| 55 | + continue; |
|
| 56 | + } |
|
| 53 | 57 | $role->givePermissionTo($cleanPermissionName); |
| 54 | 58 | } |
| 55 | 59 | |
@@ -47,7 +47,9 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | private function assignPermissionsToRoles($permissions) |
| 49 | 49 | { |
| 50 | - if(!$this->option('role')) return; |
|
| 50 | + if(!$this->option('role')) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 51 | 53 | |
| 52 | 54 | $roleNames = explode(',', $this->option('role')); |
| 53 | 55 | |
@@ -198,7 +198,9 @@ |
||
| 198 | 198 | |
| 199 | 199 | private function guessNamespace() |
| 200 | 200 | { |
| 201 | - if(isset($this->settings['namespace'])) return $this->settings['namespace']; |
|
| 201 | + if(isset($this->settings['namespace'])) { |
|
| 202 | + return $this->settings['namespace']; |
|
| 203 | + } |
|
| 202 | 204 | |
| 203 | 205 | // We make an estimated guess based on the project name. At Think Tomorrow, we |
| 204 | 206 | // have a src folder which is PSR-4 namespaced by the project name itself. |
@@ -17,7 +17,9 @@ |
||
| 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) return ''; |
|
| 20 | + if($this->user->invitation) { |
|
| 21 | + return ''; |
|
| 22 | + } |
|
| 21 | 23 | |
| 22 | 24 | return $this->user->isEnabled() |
| 23 | 25 | ? '' |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | if($this->isPreviewAllowed()) |
| 25 | 25 | { |
| 26 | 26 | $pages = Page::all(); |
| 27 | - }else{ |
|
| 27 | + } else{ |
|
| 28 | 28 | $pages = Page::getAllPublished(); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -39,7 +39,9 @@ discard block |
||
| 39 | 39 | $page = Page::findPublishedBySlug($request->slug); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if(!$page) return redirect()->route('demo.pages.index')->with('note.default', 'Geen resultaten gevonden.'); |
|
| 42 | + if(!$page) { |
|
| 43 | + return redirect()->route('demo.pages.index')->with('note.default', 'Geen resultaten gevonden.'); |
|
| 44 | + } |
|
| 43 | 45 | |
| 44 | 46 | return view('demo::pagedetail', compact('page')); |
| 45 | 47 | } |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | |
| 62 | 62 | foreach ($keys as $key) |
| 63 | 63 | { |
| 64 | - if(!isset($translation[$key])) continue; |
|
| 64 | + if(!isset($translation[$key])) { |
|
| 65 | + continue; |
|
| 66 | + } |
|
| 65 | 67 | |
| 66 | 68 | if (trim($translation[$key])) |
| 67 | 69 | { |
@@ -67,9 +67,13 @@ discard block |
||
| 67 | 67 | public function getTranslationFor($attribute,$locale = null, $strict = true) |
| 68 | 68 | { |
| 69 | 69 | // No locale given means we take the current defaulted locale (handled automagically) |
| 70 | - if(!$locale) return $this->getAttribute($attribute); |
|
| 70 | + if(!$locale) { |
|
| 71 | + return $this->getAttribute($attribute); |
|
| 72 | + } |
|
| 71 | 73 | |
| 72 | - if (!$this->hasTranslation($locale) && $strict) return null; |
|
| 74 | + if (!$this->hasTranslation($locale) && $strict) { |
|
| 75 | + return null; |
|
| 76 | + } |
|
| 73 | 77 | |
| 74 | 78 | return $this->getTranslation($locale)->{$attribute}; |
| 75 | 79 | } |
@@ -213,7 +217,9 @@ discard block |
||
| 213 | 217 | */ |
| 214 | 218 | public function translateForForm($locale, $key) |
| 215 | 219 | { |
| 216 | - if(!isset($this->trans) || !isset($this->trans[$locale])) return null; |
|
| 220 | + if(!isset($this->trans) || !isset($this->trans[$locale])) { |
|
| 221 | + return null; |
|
| 222 | + } |
|
| 217 | 223 | |
| 218 | 224 | return $this->trans[$locale][$key] ?? null; |
| 219 | 225 | } |
@@ -251,7 +257,9 @@ discard block |
||
| 251 | 257 | $is_completely_empty = true; |
| 252 | 258 | foreach ($keys as $key) |
| 253 | 259 | { |
| 254 | - if(!isset($translation[$key])) continue; |
|
| 260 | + if(!isset($translation[$key])) { |
|
| 261 | + continue; |
|
| 262 | + } |
|
| 255 | 263 | if (trim($translation[$key])) |
| 256 | 264 | { |
| 257 | 265 | $is_completely_empty = false; |