GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Branch master (3852ca)
by Roelof Jan
05:13
created
Category
src/Models/Article.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     {
134 134
         $paragraphs = HtmlParser::getTextBetweenTags($this->body(), 'p');
135 135
 
136
-        $paragraphs_with_text_content = array_filter($paragraphs, function ($paragraph) {
136
+        $paragraphs_with_text_content = array_filter($paragraphs, function($paragraph) {
137 137
             return !empty(strip_tags($paragraph));
138 138
         });
139 139
 
Please login to merge, or discard this patch.
src/Taxonomy/Taxonomy.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
         return TaxonomyCollection::make(json_decode(File::get($file_path), true))
28 28
 
29
-            ->map(function (array $data_source) {
29
+            ->map(function(array $data_source) {
30 30
                 return TaxonomyLevel::forDataSource($data_source);
31 31
             });
32 32
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         return self::get()
43 43
 
44
-            ->filter(function (TaxonomyLevel $level) use ($category_name) {
44
+            ->filter(function(TaxonomyLevel $level) use ($category_name) {
45 45
                 return $level->name() === $category_name;
46 46
             })
47 47
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         return self::get()
74 74
 
75
-            ->filter(function (TaxonomyLevel $level) use ($category_url) {
75
+            ->filter(function(TaxonomyLevel $level) use ($category_url) {
76 76
                 return $level->url() === $category_url;
77 77
             })
78 78
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected static function validateFilePath(string $file_path)
89 89
     {
90
-        if (! File::exists($file_path)) {
90
+        if (!File::exists($file_path)) {
91 91
             self::update(
92 92
                 new Collection([
93 93
                     Taxonomy::emptyState()
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         File::put(
109 109
             $file_path,
110 110
             $taxonomies
111
-                ->map(function (TaxonomyLevel $level) {
111
+                ->map(function(TaxonomyLevel $level) {
112 112
                     return [
113 113
                         "category_url_prefix" => $level->url(),
114 114
                         "category_name" => $level->name(),
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         self::update(
163 163
             Taxonomy::get()
164 164
 
165
-                ->map(function (TaxonomyLevel $level) use ($parent_url_prefix, $parent_category, $updating_taxonomy) {
165
+                ->map(function(TaxonomyLevel $level) use ($parent_url_prefix, $parent_category, $updating_taxonomy) {
166 166
                     if ($level->url() === $parent_url_prefix) {
167 167
                         self::onUpdatingTaxonomy($level->name(), $parent_category['category_name']);
168 168
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         Page::update(
193 193
             Page::raw()
194 194
 
195
-                ->map(function (array $page) use ($old_taxonomy_name, $new_taxonomy_name) {
195
+                ->map(function(array $page) use ($old_taxonomy_name, $new_taxonomy_name) {
196 196
                     if (isset($page['category']) && $page['category'] === $old_taxonomy_name) {
197 197
                         $page['category'] = $new_taxonomy_name;
198 198
                     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         self::update(
215 215
             Taxonomy::get()
216 216
 
217
-                ->map(function (TaxonomyLevel $level) use ($category_name) {
217
+                ->map(function(TaxonomyLevel $level) use ($category_name) {
218 218
 
219 219
                     // Update the children with the new parent category
220 220
                     if ($level->parent() === $category_name) {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                     return $level;
225 225
                 })
226 226
 
227
-                ->filter(function (TaxonomyLevel $level) use ($category_name) {
227
+                ->filter(function(TaxonomyLevel $level) use ($category_name) {
228 228
                     return $level->name() !== $category_name;
229 229
                 })
230 230
 
Please login to merge, or discard this patch.
src/Taxonomy/TaxonomyCollection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
         }
36 36
 
37 37
         $urls = Collection::make($urls)
38
-            ->sortByDesc(function (Collection $parents) {
38
+            ->sortByDesc(function(Collection $parents) {
39 39
                 return $parents->count();
40 40
             })
41
-            ->map(function (Collection $parents) {
41
+            ->map(function(Collection $parents) {
42 42
                 return $parents->first();
43 43
             });
44 44
 
45 45
         foreach ($urls as $url) {
46
-            $self = $this->filter(function (TaxonomyLevel $level) use ($url) {
46
+            $self = $this->filter(function(TaxonomyLevel $level) use ($url) {
47 47
                 return $level->name() === $url->name();
48 48
             })->first();
49 49
 
50
-            $parent = $this->filter(function (TaxonomyLevel $level) use ($url) {
50
+            $parent = $this->filter(function(TaxonomyLevel $level) use ($url) {
51 51
                 return $level->name() === $url->parent();
52 52
             })->first();
53 53
 
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
                 $parent->addChild($self);
56 56
 
57 57
                 $this->items = $this
58
-                    ->map(function (TaxonomyLevel $level) use ($parent) {
58
+                    ->map(function(TaxonomyLevel $level) use ($parent) {
59 59
                         if ($level->name() === $parent->name()) {
60 60
                             $level = $parent;
61 61
                         }
62 62
 
63 63
                         return $level;
64 64
                     })
65
-                    ->filter(function (TaxonomyLevel $level) use ($url) {
65
+                    ->filter(function(TaxonomyLevel $level) use ($url) {
66 66
                         return $level->name() !== $url->name();
67 67
                     })
68 68
                     ->toArray();
Please login to merge, or discard this patch.
src/Taxonomy/TaxonomyLevel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@
 block discarded – undo
80 80
         $parents = $this->getParentTaxonomies();
81 81
 
82 82
         return $parents
83
-            ->filter(function (TaxonomyLevel $level) {
83
+            ->filter(function(TaxonomyLevel $level) {
84 84
                 return !empty($level->url());
85 85
             })
86 86
             ->reverse()
87
-            ->map(function (TaxonomyLevel $level) {
87
+            ->map(function(TaxonomyLevel $level) {
88 88
                 return $level->url();
89 89
             })
90 90
             ->implode('/');
Please login to merge, or discard this patch.
src/FileManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     public function get(): Collection
56 56
     {
57 57
         return Collection::make(File::allFiles($this->uploaded_files_folder_path))
58
-            ->map(function (string $file_path) {
58
+            ->map(function(string $file_path) {
59 59
                 return \AloiaCms\DataSource\File::forFilePath($file_path);
60 60
             });
61 61
     }
Please login to merge, or discard this patch.
src/Page.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public static function forSlug(string $slug, bool $including_parents = false): ?Page
39 39
     {
40 40
         return self::all()
41
-            ->filter(function (Page $page) use ($slug, $including_parents) {
41
+            ->filter(function(Page $page) use ($slug, $including_parents) {
42 42
                 return $page->slug($including_parents) === $slug;
43 43
             })
44 44
             ->first();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public static function homepage(): ?Page
63 63
     {
64 64
         return self::all()
65
-            ->filter(function (Page $page) {
65
+            ->filter(function(Page $page) {
66 66
                 return $page->isHomepage();
67 67
             })
68 68
             ->first();
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
         self::validateMetaDataFile($file_path);
458 458
 
459 459
         return Collection::make(json_decode(File::get($file_path), true))
460
-            ->map(function ($page) {
460
+            ->map(function($page) {
461 461
                 return new static($page);
462 462
             });
463 463
     }
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     public static function published(): Collection
471 471
     {
472 472
         return Page::all()
473
-            ->filter(function (Page $page) {
473
+            ->filter(function(Page $page) {
474 474
                 return $page->isPublished();
475 475
             })
476 476
             ->values();
@@ -500,11 +500,11 @@  discard block
 block discarded – undo
500 500
     {
501 501
         $pages_folder_path = Config::get('aloiacms.pages.folder_path');
502 502
 
503
-        if (! is_dir($pages_folder_path)) {
503
+        if (!is_dir($pages_folder_path)) {
504 504
             mkdir($pages_folder_path);
505 505
         }
506 506
 
507
-        if (! file_exists($file_path)) {
507
+        if (!file_exists($file_path)) {
508 508
             self::update(
509 509
                 new Collection()
510 510
             );
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         File::put(
524 524
             $file_path,
525 525
             $pages
526
-                ->map(function (array $page) {
526
+                ->map(function(array $page) {
527 527
                     return \AloiaCms\DataSource\Page::create($page)->toArray();
528 528
                 })
529 529
                 ->toJson(JSON_PRETTY_PRINT)
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
         File::put(
545 545
             $file_path,
546 546
             self::raw()
547
-                ->filter(function (array $page) use (&$filename, $slug) {
547
+                ->filter(function(array $page) use (&$filename, $slug) {
548 548
                     $matches = strpos($page['filename'], $slug) !== false;
549 549
 
550 550
                     if ($matches) {
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 
554 554
                     return !$matches;
555 555
                 })
556
-                ->map(function (array $page) {
556
+                ->map(function(array $page) {
557 557
                     return \AloiaCms\DataSource\Page::create($page)->toArray();
558 558
                 })
559 559
                 ->toJson(JSON_PRETTY_PRINT)
Please login to merge, or discard this patch.
src/Search/FileFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
 
29 29
         return Collection::make($files)
30 30
 
31
-            ->map(function (string $file_path) use ($instance_name): ?PublishInterface {
31
+            ->map(function(string $file_path) use ($instance_name): ?PublishInterface {
32 32
                 $filename_without_extension = pathinfo($file_path, PATHINFO_FILENAME);
33 33
 
34 34
                 return $instance_name::find($filename_without_extension);
35 35
             })
36 36
 
37
-            ->filter(function (?PublishInterface $model): bool {
37
+            ->filter(function(?PublishInterface $model): bool {
38 38
                 return !is_null($model) && $model->isPublished();
39 39
             });
40 40
     }
Please login to merge, or discard this patch.
src/Console/NewArticle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     private function validateInput()
65 65
     {
66
-        if (! $this->option('slug')) {
66
+        if (!$this->option('slug')) {
67 67
             throw new \Exception("You need to submit a slug using --slug");
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/Article.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public static function forSlug(string $slug): ?Article
36 36
     {
37 37
         return self::all()
38
-            ->filter(function (Article $article) use ($slug) {
38
+            ->filter(function(Article $article) use ($slug) {
39 39
                 return $article->slug() === $slug;
40 40
             })
41 41
             ->first();
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         self::validateMetaDataFile($file_path);
336 336
 
337 337
         return Collection::make(json_decode(File::get($file_path), true))
338
-            ->map(function ($article) {
338
+            ->map(function($article) {
339 339
                 return new static($article);
340 340
             });
341 341
     }
@@ -364,11 +364,11 @@  discard block
 block discarded – undo
364 364
     {
365 365
         $articles_folder_path = Config::get('aloiacms.articles.folder_path');
366 366
 
367
-        if (! is_dir($articles_folder_path)) {
367
+        if (!is_dir($articles_folder_path)) {
368 368
             mkdir($articles_folder_path);
369 369
         }
370 370
 
371
-        if (! file_exists($file_path)) {
371
+        if (!file_exists($file_path)) {
372 372
             self::update(
373 373
                 new Collection()
374 374
             );
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         File::put(
388 388
             $file_path,
389 389
             $articles
390
-                ->map(function ($article) {
390
+                ->map(function($article) {
391 391
                     return \AloiaCms\DataSource\Article::create($article)->toArray();
392 392
                 })
393 393
                 ->toJson(JSON_PRETTY_PRINT)
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         File::put(
409 409
             $file_path,
410 410
             self::raw()
411
-                ->filter(function (array $article) use (&$filename, $slug) {
411
+                ->filter(function(array $article) use (&$filename, $slug) {
412 412
                     $matches = strpos($article['filename'], $slug) !== false;
413 413
 
414 414
                     if ($matches) {
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
                     return !$matches;
419 419
                 })
420
-                ->map(function ($article) {
420
+                ->map(function($article) {
421 421
                     return \AloiaCms\DataSource\Article::create($article)->toArray();
422 422
                 })
423 423
                 ->toJson(JSON_PRETTY_PRINT)
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public static function published(): Collection
437 437
     {
438 438
         return Article::all()
439
-            ->filter(function (Article $article) {
439
+            ->filter(function(Article $article) {
440 440
                 return $article->isPublished();
441 441
             })
442 442
             ->values();
Please login to merge, or discard this patch.