@@ -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(); |
@@ -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 | } |
@@ -51,10 +51,14 @@ |
||
51 | 51 | |
52 | 52 | public function required(): bool |
53 | 53 | { |
54 | - if(!$this->hasValidation()) return false; |
|
54 | + if(!$this->hasValidation()) { |
|
55 | + return false; |
|
56 | + } |
|
55 | 57 | |
56 | 58 | foreach($this->values['validation'] as $rule){ |
57 | - if(false !== strpos($rule, 'required')) return true; |
|
59 | + if(false !== strpos($rule, 'required')) { |
|
60 | + return true; |
|
61 | + } |
|
58 | 62 | }; |
59 | 63 | |
60 | 64 | return false; |
@@ -14,7 +14,9 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | private function get_http_response_code(string $url) { |
17 | - if($url =='') return false; |
|
17 | + if($url =='') { |
|
18 | + return false; |
|
19 | + } |
|
18 | 20 | |
19 | 21 | // Avoid ssl errors: SSL operation failed with code 1 |
20 | 22 | stream_context_set_default([ |