Passed
Push — master ( 2ce220...b7b370 )
by Caen
03:13 queued 11s
created
packages/framework/src/Foundation/RouteCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 {
34 34
     public function getRoutes(?string $pageClass = null): self
35 35
     {
36
-        return ! $pageClass ? $this : $this->filter(function (Route $route) use ($pageClass) {
36
+        return !$pageClass ? $this : $this->filter(function(Route $route) use ($pageClass) {
37 37
             return $route->getSourceModel() instanceof $pageClass;
38 38
         });
39 39
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function runDiscovery(): self
61 61
     {
62
-        $this->kernel->pages()->each(function (HydePage $page) {
62
+        $this->kernel->pages()->each(function(HydePage $page) {
63 63
             $this->discover($page);
64 64
         });
65 65
 
Please login to merge, or discard this patch.
packages/framework/src/Commands/HydeRouteListCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
     protected function formatOutputPath(string $path): string
58 58
     {
59
-        if (! file_exists(Hyde::sitePath($path))) {
59
+        if (!file_exists(Hyde::sitePath($path))) {
60 60
             return "_site/$path";
61 61
         }
62 62
 
Please login to merge, or discard this patch.
packages/framework/src/Services/AssetService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     protected function getCacheBustKey(string $file): string
52 52
     {
53
-        if (! config('hyde.cache_busting', true)) {
53
+        if (!config('hyde.cache_busting', true)) {
54 54
             return '';
55 55
         }
56 56
 
Please login to merge, or discard this patch.
packages/framework/src/Models/Support/ValidationResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
     public function failed(): bool
75 75
     {
76
-        return ! $this->passed;
76
+        return !$this->passed;
77 77
     }
78 78
 
79 79
     public function statusCode(): int
Please login to merge, or discard this patch.
packages/framework/src/Models/Support/Route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
      */
197 197
     public static function getFromSource(string $sourceFilePath): static
198 198
     {
199
-        return Hyde::routes()->first(function (Route $route) use ($sourceFilePath) {
199
+        return Hyde::routes()->first(function(Route $route) use ($sourceFilePath) {
200 200
             return $route->getSourcePath() === $sourceFilePath;
201 201
         }) ?? throw new RouteNotFoundException($sourceFilePath);
202 202
     }
Please login to merge, or discard this patch.
packages/framework/src/Services/BuildService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function compileStaticPages(): void
37 37
     {
38
-        $this->getDiscoveredModels()->each(function (string $pageClass) {
38
+        $this->getDiscoveredModels()->each(function(string $pageClass) {
39 39
             $this->compilePagesForClass($pageClass);
40 40
         });
41 41
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         $this->withProgressBar(
63 63
             $collection,
64
-            function ($filepath) {
64
+            function($filepath) {
65 65
                 copy($filepath, Hyde::sitePath('media/'.basename($filepath)));
66 66
             }
67 67
         );
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function getDiscoveredModels(): RouteCollection
75 75
     {
76
-        return $this->router->getRoutes()->map(function (Route $route) {
76
+        return $this->router->getRoutes()->map(function(Route $route) {
77 77
             return $route->getPageType();
78 78
         })->unique();
79 79
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /** @psalm-return \Closure(\Hyde\Framework\Models\Support\Route):string */
96 96
     protected function compileRoute(): \Closure
97 97
     {
98
-        return function (Route $route) {
98
+        return function(Route $route) {
99 99
             return (new StaticPageBuilder($route->getSourceModel()))->__invoke();
100 100
         };
101 101
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     protected function isItSafeToCleanOutputDirectory(): bool
109 109
     {
110
-        if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) {
110
+        if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) {
111 111
             $this->info('Output directory will not be emptied.');
112 112
 
113 113
             return false;
Please login to merge, or discard this patch.
packages/framework/src/HydeServiceProvider.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
 
33 33
         $this->app->singleton(AssetService::class, AssetService::class);
34 34
 
35
-        $this->app->singleton(MarkdownConverter::class, function () {
35
+        $this->app->singleton(MarkdownConverter::class, function() {
36 36
             return new MarkdownConverter();
37 37
         });
38 38
 
Please login to merge, or discard this patch.
packages/framework/src/Services/MarkdownService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function addExtension(string $extensionClassName): void
58 58
     {
59
-        if (! in_array($extensionClassName, $this->extensions)) {
59
+        if (!in_array($extensionClassName, $this->extensions)) {
60 60
             $this->extensions[] = $extensionClassName;
61 61
         }
62 62
     }
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 
131 131
     protected function registerPreProcessor(string $class, bool $when = true): void
132 132
     {
133
-        if (! in_array($class, $this->preprocessors) && $when) {
133
+        if (!in_array($class, $this->preprocessors) && $when) {
134 134
             $this->preprocessors[] = $class;
135 135
         }
136 136
     }
137 137
 
138 138
     protected function registerPostProcessor(string $class, bool $when = true): void
139 139
     {
140
-        if (! in_array($class, $this->postprocessors) && $when) {
140
+        if (!in_array($class, $this->postprocessors) && $when) {
141 141
             $this->postprocessors[] = $class;
142 142
         }
143 143
     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     public function addFeature(string $feature): static
183 183
     {
184
-        if (! in_array($feature, $this->features)) {
184
+        if (!in_array($feature, $this->features)) {
185 185
             $this->features[] = $feature;
186 186
         }
187 187
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
     protected function determineIfTorchlightAttributionShouldBeInjected(): bool
235 235
     {
236
-        return ! $this->isDocumentationPage()
236
+        return !$this->isDocumentationPage()
237 237
             && config('torchlight.attribution.enabled', true)
238 238
             && str_contains($this->html, 'Syntax highlighted by torchlight.dev');
239 239
     }
Please login to merge, or discard this patch.