Passed
Push — master ( 7bf7c7...8a9b32 )
by Caen
02:53
created
packages/framework/src/Concerns/ConstructsPageSchemas.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
     protected function makeCanonicalUrl(): ?string
41 41
     {
42
-        if (! empty($this->matter('canonicalUrl'))) {
42
+        if (!empty($this->matter('canonicalUrl'))) {
43 43
             return $this->matter('canonicalUrl');
44 44
         }
45 45
 
46
-        if (Hyde::hasSiteUrl() && ! empty($this->identifier)) {
46
+        if (Hyde::hasSiteUrl() && !empty($this->identifier)) {
47 47
             return $this->getRoute()->getQualifiedUrl();
48 48
         }
49 49
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $orderIndexArray = config('docs.sidebar_order', []);
112 112
 
113
-        if (! in_array($this->identifier, $orderIndexArray)) {
113
+        if (!in_array($this->identifier, $orderIndexArray)) {
114 114
             return 500;
115 115
         }
116 116
 
Please login to merge, or discard this patch.
packages/framework/src/Commands/HydeRebuildStaticSiteCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function validate(): void
99 99
     {
100
-        if (! (
100
+        if (!(
101 101
             str_starts_with($this->path, Hyde::pathToRelative(Hyde::getBladePagePath())) ||
102 102
             str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPagePath())) ||
103 103
             str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPostPath())) ||
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             throw new Exception("Path [$this->path] is not in a valid source directory.", 400);
107 107
         }
108 108
 
109
-        if (! file_exists(Hyde::path($this->path))) {
109
+        if (!file_exists(Hyde::path($this->path))) {
110 110
             throw new Exception("File [$this->path] not found.", 404);
111 111
         }
112 112
     }
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function compileStaticPages(): void
36 36
     {
37
-        $this->getDiscoveredModels()->each(function (string $pageClass) {
37
+        $this->getDiscoveredModels()->each(function(string $pageClass) {
38 38
             $this->compilePagesForClass($pageClass);
39 39
         });
40 40
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         $this->withProgressBar(
62 62
             $collection,
63
-            function ($filepath) {
63
+            function($filepath) {
64 64
                 copy($filepath, Hyde::sitePath('media/'.basename($filepath)));
65 65
             }
66 66
         );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     protected function getDiscoveredModels(): RouteCollection
74 74
     {
75
-        return $this->router->getRoutes()->map(function (Route $route) {
75
+        return $this->router->getRoutes()->map(function(Route $route) {
76 76
             return $route->getPageType();
77 77
         })->unique();
78 78
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     /** @psalm-return \Closure(Route):string */
95 95
     protected function compileRoute(): \Closure
96 96
     {
97
-        return function (Route $route) {
97
+        return function(Route $route) {
98 98
             return (new StaticPageBuilder($route->getSourceModel()))->__invoke();
99 99
         };
100 100
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     protected function isItSafeToCleanOutputDirectory(): bool
108 108
     {
109
-        if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) {
109
+        if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) {
110 110
             $this->info('Output directory will not be emptied.');
111 111
 
112 112
             return false;
Please login to merge, or discard this patch.
packages/framework/src/Concerns/HydePage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             return property_exists($this, $key) || $this->matter->has($key);
191 191
         }
192 192
 
193
-        return ! blank($this->get($key));
193
+        return !blank($this->get($key));
194 194
     }
195 195
 
196 196
     /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
     public function showInNavigation(): bool
281 281
     {
282
-        return ! $this->navigation['hidden'];
282
+        return !$this->navigation['hidden'];
283 283
     }
284 284
 
285 285
     public function navigationMenuPriority(): int
Please login to merge, or discard this patch.
packages/framework/src/Foundation/PageCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function getPages(?string $pageClass = null): self
27 27
     {
28
-        return ! $pageClass ? $this : $this->filter(function (HydePage $page) use ($pageClass): bool {
28
+        return !$pageClass ? $this : $this->filter(function(HydePage $page) use ($pageClass) : bool {
29 29
             return $page instanceof $pageClass;
30 30
         });
31 31
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     protected function discoverPagesFor(string $pageClass): void
55 55
     {
56
-        $this->parsePagesFor($pageClass)->each(function ($page) {
56
+        $this->parsePagesFor($pageClass)->each(function($page) {
57 57
             $this->discover($page);
58 58
         });
59 59
     }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/RouteCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 {
35 35
     public function getRoutes(?string $pageClass = null): self
36 36
     {
37
-        return ! $pageClass ? $this : $this->filter(function (RouteContract $route) use ($pageClass) {
37
+        return !$pageClass ? $this : $this->filter(function(RouteContract $route) use ($pageClass) {
38 38
             return $route->getSourceModel() instanceof $pageClass;
39 39
         });
40 40
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     protected function runDiscovery(): self
62 62
     {
63
-        $this->kernel->pages()->each(function (HydePage $page) {
63
+        $this->kernel->pages()->each(function(HydePage $page) {
64 64
             $this->discover($page);
65 65
         });
66 66
 
Please login to merge, or discard this patch.
packages/framework/src/Services/DiscoveryService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
      */
37 37
     public static function getSourceFileListForModel(string $model): array
38 38
     {
39
-        if (! class_exists($model) || ! is_subclass_of($model, HydePage::class)) {
39
+        if (!class_exists($model) || !is_subclass_of($model, HydePage::class)) {
40 40
             throw new UnsupportedPageTypeException($model);
41 41
         }
42 42
 
43 43
         $files = [];
44
-        Hyde::files()->getSourceFiles($model)->each(function (File $file) use (&$files, $model) {
44
+        Hyde::files()->getSourceFiles($model)->each(function(File $file) use (&$files, $model) {
45 45
             $files[] = self::formatSlugForModel($model, $file->withoutDirectoryPrefix());
46 46
         });
47 47
 
Please login to merge, or discard this patch.