Passed
Push — master ( 25efb9...c70e91 )
by Caen
04:09 queued 12s
created
src/Markdown/Contracts/FrontMatter/SubSchemas/NavigationSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 {
13 13
     public const NAVIGATION_SCHEMA = [
14 14
         'label'     => 'string',
15
-        'priority'  => 'int',  // Order is also supported
16
-        'hidden'    => 'bool',  // Visible is also supported (but obviously invert the value)
15
+        'priority'  => 'int', // Order is also supported
16
+        'hidden'    => 'bool', // Visible is also supported (but obviously invert the value)
17 17
         'group'     => 'string', // Category is also supported
18 18
     ];
19 19
 }
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/PublishHomepageCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $selected = $this->parseSelection();
56 56
 
57
-        if (! $this->canExistingFileBeOverwritten()) {
57
+        if (!$this->canExistingFileBeOverwritten()) {
58 58
             $this->error('A modified index.blade.php file already exists. Use --force to overwrite.');
59 59
 
60 60
             return 409;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         Artisan::call('vendor:publish', [
66 66
             '--tag' => $this->options[$selected]['group'] ?? $selected,
67 67
             '--force' => true, // Todo add force state dynamically depending on existing file state
68
-        ], ! $tagExists ? $this->output : null);
68
+        ], !$tagExists ? $this->output : null);
69 69
 
70 70
         if ($tagExists) {
71 71
             $this->infoComment("Published page [$selected]");
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     protected function formatPublishableChoices(): array
94 94
     {
95
-        return $this->getTemplateOptions()->map(function (array $option, string $key): string {
95
+        return $this->getTemplateOptions()->map(function(array $option, string $key): string {
96 96
             return  "<comment>$key</comment>: {$option['description']}";
97 97
         })->values()->toArray();
98 98
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             return true;
114 114
         }
115 115
 
116
-        if (! file_exists(BladePage::path('index.blade.php'))) {
116
+        if (!file_exists(BladePage::path('index.blade.php'))) {
117 117
             return true;
118 118
         }
119 119
 
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/RebuildPageCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,11 +93,11 @@
 block discarded – undo
93 93
                     Hyde::pathToRelative(DocumentationPage::path()),
94 94
                 ];
95 95
 
96
-                if (! in_array($directory, $directories)) {
96
+                if (!in_array($directory, $directories)) {
97 97
                     throw new Exception("Path [$this->path] is not in a valid source directory.", 400);
98 98
                 }
99 99
 
100
-                if (! file_exists(Hyde::path($this->path))) {
100
+                if (!file_exists(Hyde::path($this->path))) {
101 101
                     throw new Exception("File [$this->path] not found.", 404);
102 102
                 }
103 103
             }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Kernel/FileCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         // Scan the source directory, and directories therein, for files that match the model's file extension.
57 57
         foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) {
58
-            if (! str_starts_with(basename((string) $filepath), '_')) {
58
+            if (!str_starts_with(basename((string) $filepath), '_')) {
59 59
                 $this->addFile(SourceFile::make($filepath, $pageClass));
60 60
             }
61 61
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function getFiles(?string $pageClass = null): FileCollection
74 74
     {
75
-        return $pageClass ? $this->filter(function (SourceFile $file) use ($pageClass): bool {
75
+        return $pageClass ? $this->filter(function(SourceFile $file) use ($pageClass) : bool {
76 76
             return $file->pageClass === $pageClass;
77 77
         }) : $this;
78 78
     }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Kernel/PageCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function runDiscovery(): void
34 34
     {
35
-        $this->kernel->files()->each(function (SourceFile $file): void {
35
+        $this->kernel->files()->each(function(SourceFile $file): void {
36 36
             $this->addPage($this->parsePage($file->pageClass, $file->getPath()));
37 37
         });
38 38
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function getPages(?string $pageClass = null): PageCollection
64 64
     {
65
-        return $pageClass ? $this->filter(function (HydePage $page) use ($pageClass): bool {
65
+        return $pageClass ? $this->filter(function(HydePage $page) use ($pageClass) : bool {
66 66
             return $page instanceof $pageClass;
67 67
         }) : $this;
68 68
     }
Please login to merge, or discard this patch.
packages/framework/src/Pages/Concerns/HydePage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public static function files(): array
128 128
     {
129
-        return Files::getFiles(static::class)->map(function (SourceFile $file): string {
129
+        return Files::getFiles(static::class)->map(function(SourceFile $file): string {
130 130
             return static::pathToIdentifier($file->getPath());
131 131
         })->values()->toArray();
132 132
     }
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
     public function showInNavigation(): bool
365 365
     {
366
-        return ! $this->navigation->hidden;
366
+        return !$this->navigation->hidden;
367 367
     }
368 368
 
369 369
     public function navigationMenuPriority(): int
Please login to merge, or discard this patch.