Completed
Push — master ( 857423...1da492 )
by Sebastian
03:55
created
app/Foundation/Models/Updaters/UpdatesSeoValues.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
     protected function updateSeoValues()
12 12
     {
13 13
         collect($this->request->all())
14
-            ->filter(function ($value, $fieldName) {
14
+            ->filter(function($value, $fieldName) {
15 15
                 // Filter out everything that starts with 'translated_<locale>_seo_'
16 16
                 return Regex::match('/^translated_([a-z][a-z])_seo_/', $fieldName)->hasMatch();
17 17
             })
18
-            ->map(function ($value, $fieldName) {
18
+            ->map(function($value, $fieldName) {
19 19
 
20 20
                 // Replace 'translated_<locale>_seo_<attribute>' with '<locale>_<attribute>'
21
-                $localeAndAttribute = Regex::replace('/translated_([a-z][a-z])_seo_/', function (MatchResult $matchResult) {
21
+                $localeAndAttribute = Regex::replace('/translated_([a-z][a-z])_seo_/', function(MatchResult $matchResult) {
22 22
                     return $matchResult->group(1).'_';
23 23
                 }, $fieldName)->result();
24 24
 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
                 ];
32 32
             })
33 33
             ->groupBy('locale')
34
-            ->map(function (Collection $valuesInLocale) {
35
-                return $valuesInLocale->mapToAssoc(function ($values) {
34
+            ->map(function(Collection $valuesInLocale) {
35
+                return $valuesInLocale->mapToAssoc(function($values) {
36 36
                     return [$values['attribute'], $values['value']];
37 37
                 });
38 38
             })
39
-            ->each(function ($values, $locale) {
39
+            ->each(function($values, $locale) {
40 40
                 $this->model->setTranslation('seo_values', $locale, $values);
41 41
             });
42 42
     }
Please login to merge, or discard this patch.
app/Foundation/helpers.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         return $constants;
107 107
     }
108 108
 
109
-    return array_filter($constants, function ($key) use ($startsWithFilter) {
109
+    return array_filter($constants, function($key) use ($startsWithFilter) {
110 110
         return starts_with(strtolower($key), strtolower($startsWithFilter));
111 111
     }, ARRAY_FILTER_USE_KEY);
112 112
 }
@@ -152,15 +152,13 @@  discard block
 block discarded – undo
152 152
 function login_url(): string
153 153
 {
154 154
     return request()->isFront() ?
155
-        action('Front\Auth\LoginController@showLoginForm') :
156
-        action('Back\Auth\LoginController@showLoginForm');
155
+        action('Front\Auth\LoginController@showLoginForm') : action('Back\Auth\LoginController@showLoginForm');
157 156
 }
158 157
 
159 158
 function logout_url(): string
160 159
 {
161 160
     return request()->isFront() ?
162
-        action('Front\Auth\LoginController@logout') :
163
-        action('Back\Auth\LoginController@logout');
161
+        action('Front\Auth\LoginController@logout') : action('Back\Auth\LoginController@logout');
164 162
 }
165 163
 
166 164
 function register_url(): string
@@ -197,7 +195,7 @@  discard block
 block discarded – undo
197 195
 function rgb_to_hex(int $red, int $green, int $blue):  string
198 196
 {
199 197
     return '#'.collect([$red, $green, $blue])
200
-        ->map(function (int $decimal) :  string {
198
+        ->map(function(int $decimal) :  string {
201 199
             return str_pad(dechex($decimal), 2, STR_PAD_LEFT);
202 200
         })
203 201
         ->implode('');
Please login to merge, or discard this patch.
app/Mail/EventHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 {
14 14
     public function subscribe(Dispatcher $events)
15 15
     {
16
-        $events->listen(UserRegistered::class, function (UserRegistered $event) {
16
+        $events->listen(UserRegistered::class, function(UserRegistered $event) {
17 17
             Mail::send(new Welcome($event->user));
18 18
         });
19 19
 
20
-        $events->listen(UserCreatedThroughBack::class, function (UserCreatedThroughBack $event) {
21
-            Password::broker('front')->sendResetLink(['email' => $event->user->email], function (Message $message) {
20
+        $events->listen(UserCreatedThroughBack::class, function(UserCreatedThroughBack $event) {
21
+            Password::broker('front')->sendResetLink(['email' => $event->user->email], function(Message $message) {
22 22
                 $message->subject('Welkom bij '.config('app.url'));
23 23
             });
24 24
         });
Please login to merge, or discard this patch.