Passed
Push — master ( b1166c...75f29e )
by Caen
02:47
created
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.
packages/framework/src/Concerns/ValidatesExistence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $filepath = $model::sourceDirectory().'/'.
24 24
             $slug.$model::fileExtension();
25 25
 
26
-        if (! file_exists(Hyde::path($filepath))) {
26
+        if (!file_exists(Hyde::path($filepath))) {
27 27
             throw new FileNotFoundException($filepath);
28 28
         }
29 29
     }
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
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     public function has(string $key): bool
246 246
     {
247
-        return ! blank($this->get($key));
247
+        return !blank($this->get($key));
248 248
     }
249 249
 
250 250
     // Section: Accessors
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
     public function showInNavigation(): bool
266 266
     {
267
-        return ! $this->navigation['hidden'];
267
+        return !$this->navigation['hidden'];
268 268
     }
269 269
 
270 270
     public function navigationMenuPriority(): int
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
@@ -19,26 +19,26 @@  discard block
 block discarded – undo
19 19
 {
20 20
     public function getSourceFiles(?string $pageClass = null): self
21 21
     {
22
-        return ! $pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
22
+        return !$pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
23 23
     }
24 24
 
25 25
     public function getAllSourceFiles(): self
26 26
     {
27
-        return $this->filter(function (File $file) {
27
+        return $this->filter(function(File $file) {
28 28
             return $file->belongsTo !== null;
29 29
         });
30 30
     }
31 31
 
32 32
     public function getSourceFilesFor(string $pageClass): self
33 33
     {
34
-        return $this->filter(function (File $file) use ($pageClass): bool {
34
+        return $this->filter(function(File $file) use ($pageClass): bool {
35 35
             return $file->belongsTo() === $pageClass;
36 36
         });
37 37
     }
38 38
 
39 39
     public function getMediaFiles(): self
40 40
     {
41
-        return $this->filter(function (File $file): bool {
41
+        return $this->filter(function(File $file): bool {
42 42
             return str_starts_with($file, '_media');
43 43
         });
44 44
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         // Scan the source directory, and directories therein, for files that match the model's file extension.
73 73
         foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) {
74
-            if (! str_starts_with(basename($filepath), '_')) {
74
+            if (!str_starts_with(basename($filepath), '_')) {
75 75
                 $this->put($this->kernel->pathToRelative($filepath), File::make($filepath)->belongsTo($pageClass));
76 76
             }
77 77
         }
Please login to merge, or discard this patch.
packages/framework/src/Concerns/Internal/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.