Completed
Push — master ( 21516d...ca746a )
by Sebastian
04:04
created
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.*', function ($user, $userId) {
22
+        Broadcast::channel('App.User.*', function($user, $userId) {
23 23
             return (int) $user->id === (int) $userId;
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
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.
app/Services/Html/BlenderFormBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -245,11 +245,11 @@  discard block
 block discarded – undo
245 245
 
246 246
     public function seo(): string
247 247
     {
248
-        return locales()->map(function ($locale) {
248
+        return locales()->map(function($locale) {
249 249
 
250 250
             return collect($this->model->defaultSeoValues())
251 251
                 ->keys()
252
-                ->map(function ($attribute) use ($locale) {
252
+                ->map(function($attribute) use ($locale) {
253 253
 
254 254
                     $fieldName = translate_field_name("seo.{$attribute}", $locale);
255 255
 
@@ -258,11 +258,11 @@  discard block
 block discarded – undo
258 258
                         Form::text(
259 259
                             $fieldName,
260 260
                             old($fieldName, $this->model->getTranslation('seo_values', $locale)[$attribute] ?? ''),
261
-                            [ 'placeholder' => $this->model->defaultSeoValues()[$attribute] ]
261
+                            ['placeholder' => $this->model->defaultSeoValues()[$attribute]]
262 262
                         ),
263 263
                     ]);
264 264
                 })
265
-                ->pipe(function (Collection $fields) use ($locale) {
265
+                ->pipe(function(Collection $fields) use ($locale) {
266 266
                     return $this->languageFieldSet($locale, $fields->toArray());
267 267
                 });
268 268
         })->implode('');
Please login to merge, or discard this patch.
app/Http/Controllers/Back/MediaLibraryApiController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 
21 21
         $files = $request->file('file');
22 22
 
23
-        if (! is_array($files)) {
23
+        if (!is_array($files)) {
24 24
             $files = [$files];
25 25
         }
26 26
 
27 27
         $media = collect($files)
28
-            ->map(function (UploadedFile $file) use ($model, $request) {
28
+            ->map(function(UploadedFile $file) use ($model, $request) {
29 29
                 return $model
30 30
                     ->addMedia($file)
31 31
                     ->withCustomProperties(['temp' => $request->has('redactor') ? false : true])
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $collectionName = $request->get('collectionName');
47 47
 
48
-        $media = $model->getMedia($collectionName)->reduce(function (Collection $collection, Media $media) {
48
+        $media = $model->getMedia($collectionName)->reduce(function(Collection $collection, Media $media) {
49 49
             return $collection->push([
50 50
                 'thumb' => $media->getUrl('admin'),
51 51
                 'image' => $media->getUrl('redactor'),
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     protected function registerMacros(Router $router)
27 27
     {
28
-        $router->macro('module', function ($slug, $className, $sortable = false) use ($router) {
28
+        $router->macro('module', function($slug, $className, $sortable = false) use ($router) {
29 29
             if ($sortable) {
30 30
                 $router->patch("{$slug}/changeOrder", "{$className}Controller@changeOrder");
31 31
             }
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
             $router->resource($slug, "{$className}Controller");
34 34
         });
35 35
 
36
-        $router->macro('articleList', function ($technicalNamePrefix, $action) use ($router) {
36
+        $router->macro('articleList', function($technicalNamePrefix, $action) use ($router) {
37 37
 
38 38
             $articles = Article::getWithTechnicalNameLike($technicalNamePrefix);
39 39
 
40
-            $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}"), function () use ($articles) {
40
+            $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}"), function() use ($articles) {
41 41
                 return redirect(route("{$articles->first()->technical_name}"));
42 42
             })->name($technicalNamePrefix);
43 43
 
44
-            $articles->map(function ($article) use ($technicalNamePrefix, $action, $router) {
44
+            $articles->map(function($article) use ($technicalNamePrefix, $action, $router) {
45 45
                 $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}").'/'.$article->url, $action)->name("{$article->technical_name}");
46 46
             });
47 47
         });
@@ -51,16 +51,16 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function map(Router $router)
53 53
     {
54
-        Route::group(['namespace' => $this->namespace], function () {
54
+        Route::group(['namespace' => $this->namespace], function() {
55 55
 
56 56
             /*
57 57
              * Special routes
58 58
              */
59
-            Route::group(['middleware' => 'web'], function () {
59
+            Route::group(['middleware' => 'web'], function() {
60 60
 
61 61
                 Route::demoAccess('/demo');
62 62
 
63
-                Route::get('coming-soon', function () {
63
+                Route::get('coming-soon', function() {
64 64
                     return view('temp/index');
65 65
                 });
66 66
             });
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
             /*
69 69
              * Back site
70 70
              */
71
-            Route::group(['namespace' => 'Back', 'middleware' => 'web', 'prefix' => 'blender'], function () {
71
+            Route::group(['namespace' => 'Back', 'middleware' => 'web', 'prefix' => 'blender'], function() {
72 72
                 Auth::routes();
73 73
 
74
-                Route::group(['middleware' => 'auth'], function () {
74
+                Route::group(['middleware' => 'auth'], function() {
75 75
                     require base_path('routes/back.php');
76 76
                 });
77 77
             });
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
              * Frontsite
81 81
              */
82 82
 
83
-            Route::group(['namespace' => 'Front'], function () {
84
-                Route::group(['namespace' => 'Api', 'middleware' => 'api', 'prefix' => 'api'], function () {
83
+            Route::group(['namespace' => 'Front'], function() {
84
+                Route::group(['namespace' => 'Api', 'middleware' => 'api', 'prefix' => 'api'], function() {
85 85
                     require base_path('routes/frontApi.php');
86 86
                 });
87 87
 
88
-                Route::group(['middleware' => ['web', 'demoMode', 'rememberLocale']], function () {
88
+                Route::group(['middleware' => ['web', 'demoMode', 'rememberLocale']], function() {
89 89
 
90 90
                     $multiLingual = count(config('app.locales')) > 1;
91 91
 
92
-                    Route::group($multiLingual ? ['prefix' => locale()] : [], function () {
92
+                    Route::group($multiLingual ? ['prefix' => locale()] : [], function() {
93 93
                         try {
94 94
                             Auth::routes();
95 95
                             require base_path('routes/front.php');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     });
100 100
 
101 101
                     if ($multiLingual) {
102
-                        Route::get('/', function () {
102
+                        Route::get('/', function() {
103 103
                             return redirect(locale());
104 104
                         });
105 105
                     }
Please login to merge, or discard this patch.