Completed
Pull Request — master (#67)
by Sebastian
04:00
created
app/Models/Tag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public static function findByNameOrCreate(string $name, TagType $type): Tag
33 33
     {
34 34
         $existing = self::nonDraft()->get()
35
-            ->first(function (Tag $tag, int $id) use ($name, $type) {
35
+            ->first(function(Tag $tag, int $id) use ($name, $type) {
36 36
                 return $tag->translate('name', content_locale()) === $name && $tag->type === (string) $type;
37 37
             });
38 38
 
Please login to merge, or discard this patch.
app/Foundation/Models/Traits/HasSeoValues.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
 
21 21
     public function renderMetaTags(): string
22 22
     {
23
-        return $this->seo()->filter(function ($value, $key) {
23
+        return $this->seo()->filter(function($value, $key) {
24 24
             return starts_with($key, 'meta_');
25
-        })->map(function ($value, $key) : string {
25
+        })->map(function($value, $key) : string {
26 26
             $key = substr($key, 5);
27 27
             $attribute = starts_with($key, 'og:') ? 'property' : 'name';
28 28
             return "<meta {$attribute}=\"{$key}\" content=\"{$value}\">";
Please login to merge, or discard this patch.
app/Http/Controllers/Back/ArticleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             'module' => $this->moduleName,
37 37
             'parentMenuItems' => app(ArticleRepository::class)
38 38
                 ->getTopLevel()
39
-                ->filter(function (Article $article) {
39
+                ->filter(function(Article $article) {
40 40
                     return $article->technical_name != SpecialArticle::HOME;
41 41
                 })
42 42
                 ->pluck('name', 'id')
Please login to merge, or discard this patch.
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/Http/Controllers/Back/Auth/LoginController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * Get the response for a successful password reset.
61 61
      *
62 62
      * @param  string  $response
63
-     * @return \Illuminate\Http\Response
63
+     * @return \Illuminate\Http\RedirectResponse
64 64
      */
65 65
     protected function sendResetResponse($response)
66 66
     {
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Auth/ResetPasswordController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * Get the response for a successful password reset.
61 61
      *
62 62
      * @param  string  $response
63
-     * @return \Illuminate\Http\Response
63
+     * @return \Illuminate\Http\RedirectResponse
64 64
      */
65 65
     protected function sendResetResponse($response)
66 66
     {
Please login to merge, or discard this patch.
app/Http/Controllers/Front/Auth/LoginController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * Get the response for a successful password reset.
61 61
      *
62 62
      * @param  string  $response
63
-     * @return \Illuminate\Http\Response
63
+     * @return \Illuminate\Http\RedirectResponse
64 64
      */
65 65
     protected function sendResetResponse($response)
66 66
     {
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.