Passed
Branch decouple-schema-constructors (7e448c)
by Caen
02:54
created
packages/framework/src/Foundation/PageCollection.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 getPages(?string $pageClass = null): self
36 36
     {
37
-        return ! $pageClass ? $this : $this->filter(function (PageContract $page) use ($pageClass): bool {
37
+        return !$pageClass ? $this : $this->filter(function(PageContract $page) use ($pageClass) : bool {
38 38
             return $page instanceof $pageClass;
39 39
         });
40 40
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     protected function discoverPagesFor(string $pageClass): void
64 64
     {
65
-        $this->parsePagesFor($pageClass)->each(function ($page) {
65
+        $this->parsePagesFor($pageClass)->each(function($page) {
66 66
             $this->discover($page);
67 67
         });
68 68
     }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/FileCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,26 +18,26 @@  discard block
 block discarded – undo
18 18
 {
19 19
     public function getSourceFiles(?string $pageClass = null): self
20 20
     {
21
-        return ! $pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
21
+        return !$pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
22 22
     }
23 23
 
24 24
     public function getAllSourceFiles(): self
25 25
     {
26
-        return $this->filter(function (File $file) {
26
+        return $this->filter(function(File $file) {
27 27
             return $file->belongsTo !== null;
28 28
         });
29 29
     }
30 30
 
31 31
     public function getSourceFilesFor(string $pageClass): self
32 32
     {
33
-        return $this->filter(function (File $file) use ($pageClass): bool {
33
+        return $this->filter(function(File $file) use ($pageClass): bool {
34 34
             return $file->belongsTo() === $pageClass;
35 35
         });
36 36
     }
37 37
 
38 38
     public function getMediaFiles(): self
39 39
     {
40
-        return $this->filter(function (File $file): bool {
40
+        return $this->filter(function(File $file): bool {
41 41
             return str_starts_with($file, '_media');
42 42
         });
43 43
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         // Scan the source directory, and directories therein, for files that match the model's file extension.
72 72
         foreach (glob($this->kernel->path($pageClass::qualifyBasename('{*,**/*}')), GLOB_BRACE) as $filepath) {
73
-            if (! str_starts_with(basename($filepath), '_')) {
73
+            if (!str_starts_with(basename($filepath), '_')) {
74 74
                 $this->put($this->kernel->pathToRelative($filepath), File::make($filepath)->belongsTo($pageClass));
75 75
             }
76 76
         }
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
@@ -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 (RouteContract $route) use ($pageClass) {
36
+        return !$pageClass ? $this : $this->filter(function(RouteContract $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 (PageContract $page) {
62
+        $this->kernel->pages()->each(function(PageContract $page) {
63 63
             $this->discover($page);
64 64
         });
65 65
 
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, AbstractPage::class)) {
39
+        if (!class_exists($model) || !is_subclass_of($model, AbstractPage::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.
packages/framework/src/Foundation/Concerns/HandlesFoundationCollections.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 
150 150
     protected function needsToBeBooted(): void
151 151
     {
152
-        if (! $this->booted) {
152
+        if (!$this->booted) {
153 153
             $this->boot();
154 154
         }
155 155
     }
Please login to merge, or discard this patch.
packages/framework/src/Services/ValidationService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function check_documentation_site_has_an_index_page(Result $result): Result
65 65
     {
66
-        if (! Features::hasDocumentationPages()) {
66
+        if (!Features::hasDocumentationPages()) {
67 67
             return $result->skip('Does documentation site have an index page?')
68 68
                 ->withTip('Skipped because: The documentation page feature is disabled in config');
69 69
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     public function check_a_torchlight_api_token_is_set(Result $result): Result
110 110
     {
111
-        if (! Features::enabled(Features::torchlight())) {
111
+        if (!Features::enabled(Features::torchlight())) {
112 112
             return $result->skip('Check a Torchlight API token is set')
113 113
                ->withTip('Torchlight is an API for code syntax highlighting. You can enable it in the Hyde config.');
114 114
         }
Please login to merge, or discard this patch.
packages/framework/src/Concerns/InteractsWithDirectories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public static function needsDirectory(string $directory): void
16 16
     {
17
-        if (! file_exists($directory)) {
17
+        if (!file_exists($directory)) {
18 18
             mkdir($directory, recursive: true);
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
packages/framework/src/Services/DocumentationSearchService.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
         /** @var DocumentationPage $page */
52 52
         foreach (DocumentationPage::all() as $page) {
53
-            if (! in_array($page->identifier, config('docs.exclude_from_search', []))) {
53
+            if (!in_array($page->identifier, config('docs.exclude_from_search', []))) {
54 54
                 $this->searchIndex->push(
55 55
                     $this->generatePageEntry($page)
56 56
                 );
Please login to merge, or discard this patch.
packages/framework/src/Concerns/AbstractPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             return property_exists($this, $key) || $this->matter->has($key);
129 129
         }
130 130
 
131
-        return ! blank($this->get($key));
131
+        return !blank($this->get($key));
132 132
     }
133 133
 
134 134
     /** @inheritDoc */
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
     public function showInNavigation(): bool
185 185
     {
186
-        return ! $this->navigation['hidden'];
186
+        return !$this->navigation['hidden'];
187 187
     }
188 188
 
189 189
     public function navigationMenuPriority(): int
Please login to merge, or discard this patch.