Completed
Push — master ( d3808e...8999f6 )
by Freek
08:15
created
app/Models/ContentBlock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@
 block discarded – undo
56 56
         }
57 57
 
58 58
         foreach ($this->mediaLibraryCollectionNames() as $collection) {
59
-            if (! isset($values[$collection])) {
59
+            if (!isset($values[$collection])) {
60 60
                 continue;
61 61
             }
62 62
 
63
-            $media = array_filter($values[$collection], function ($media) {
63
+            $media = array_filter($values[$collection], function($media) {
64 64
                 return ($media['markedForRemoval'] ?? false) !== true;
65 65
             });
66 66
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/TagsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 
26 26
     public function index()
27 27
     {
28
-        $tags = Tag::get()->reduce(function (Collection $carry, Tag $tag) {
29
-            if (! $carry->has($tag->type)) {
28
+        $tags = Tag::get()->reduce(function(Collection $carry, Tag $tag) {
29
+            if (!$carry->has($tag->type)) {
30 30
                 $carry->put($tag->type, new Collection());
31 31
             }
32 32
 
Please login to merge, or discard this patch.
app/Services/MissingPageRedirector/DatabaseRedirector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     public function getRedirectsFor(Request $request): array
12 12
     {
13
-        return Redirect::getAll()->flatMap(function ($redirect) {
13
+        return Redirect::getAll()->flatMap(function($redirect) {
14 14
             return [$redirect->old_url => $redirect->new_url];
15 15
         })->toArray();
16 16
     }
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function current_front_user()
37 37
 {
38
-    if (! auth()->guard('front')->check()) {
38
+    if (!auth()->guard('front')->check()) {
39 39
         return;
40 40
     }
41 41
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function current_back_user()
49 49
 {
50
-    if (! auth()->guard('back')->check()) {
50
+    if (!auth()->guard('back')->check()) {
51 51
         return;
52 52
     }
53 53
 
@@ -89,15 +89,13 @@  discard block
 block discarded – undo
89 89
 function login_url(): string
90 90
 {
91 91
     return request()->isFront() ?
92
-        action('Front\Auth\LoginController@showLoginForm') :
93
-        action('Back\Auth\LoginController@showLoginForm');
92
+        action('Front\Auth\LoginController@showLoginForm') : action('Back\Auth\LoginController@showLoginForm');
94 93
 }
95 94
 
96 95
 function logout_url(): string
97 96
 {
98 97
     return request()->isFront() ?
99
-        action('Front\Auth\LoginController@logout') :
100
-        action('Back\Auth\LoginController@logout');
98
+        action('Front\Auth\LoginController@logout') : action('Back\Auth\LoginController@logout');
101 99
 }
102 100
 
103 101
 function roman_year(int $year = null): string
@@ -158,11 +156,11 @@  discard block
 block discarded – undo
158 156
  */
159 157
 function validate($fields, $rules): bool
160 158
 {
161
-    if (! is_array($fields)) {
159
+    if (!is_array($fields)) {
162 160
         $fields = ['default' => $fields];
163 161
     }
164 162
 
165
-    if (! is_array($rules)) {
163
+    if (!is_array($rules)) {
166 164
         $rules = ['default' => $rules];
167 165
     }
168 166
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/ArticlesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
     public function edit(int $id)
39 39
     {
40 40
         $parentMenuItems = ArticleRepository::getTopLevel()
41
-            ->filter(function (Article $article) {
41
+            ->filter(function(Article $article) {
42 42
                 return $article->technical_name != SpecialArticle::HOME;
43 43
             })
44
-            ->reject(function (Article $article) use ($id) {
44
+            ->reject(function(Article $article) use ($id) {
45 45
                 return $article->id === $id;
46 46
             })
47 47
             ->pluck('name', 'id')
Please login to merge, or discard this patch.
app/Services/Navigation/Menu/FrontMenus.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,29 +9,29 @@
 block discarded – undo
9 9
 {
10 10
     public function register()
11 11
     {
12
-        Menu::macro('front', function () {
12
+        Menu::macro('front', function() {
13 13
             return Menu::new()->setActiveFromRequest(locale());
14 14
         });
15 15
 
16
-        Menu::macro('main', function () {
16
+        Menu::macro('main', function() {
17 17
             return Menu::front()
18 18
                 ->addClass('nav__list')
19 19
                 ->url('/', 'Home');
20 20
         });
21 21
 
22
-        Menu::macro('language', function () {
23
-            return Menu::build(locales(), function (Menu $menu, string $locale) {
22
+        Menu::macro('language', function() {
23
+            return Menu::build(locales(), function(Menu $menu, string $locale) {
24 24
                 return $menu->url($locale, strtoupper($locale));
25 25
             })->setActiveFromRequest();
26 26
         });
27 27
 
28
-        Menu::macro('articleSiblings', function (Article $article) {
29
-            return $article->siblings->reduce(function (Menu $menu, Article $article) {
28
+        Menu::macro('articleSiblings', function(Article $article) {
29
+            return $article->siblings->reduce(function(Menu $menu, Article $article) {
30 30
                 return $menu->url($article->fullUrl, $article->name);
31 31
             }, Menu::front());
32 32
         });
33 33
 
34
-        Menu::macro('article', function ($article) {
34
+        Menu::macro('article', function($article) {
35 35
             $article = $article instanceof Article ? $article : article($article);
36 36
 
37 37
             return $this->url($article->url, $article->name);
Please login to merge, or discard this patch.
app/Repositories/ArticleRepository.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
     {
31 31
         return Cache::rememberForever(
32 32
             "article.specialArticle.{$specialArticle}",
33
-            function () use ($specialArticle) {
33
+            function() use ($specialArticle) {
34 34
                 $article = Article::where('technical_name', $specialArticle)->first();
35 35
 
36
-                if (! $article) {
36
+                if (!$article) {
37 37
                     throw new Exception("There is no article with technical_name `{$specialArticle}`");
38 38
                 }
39 39
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use App\Models\Article;
6 6
 use Illuminate\Support\Collection;
7
-use App\Models\Enums\SpecialArticle;
8 7
 use Illuminate\Support\Facades\Cache;
9 8
 
10 9
 class ArticleRepository
Please login to merge, or discard this patch.