Passed
Push — master ( 10719f...7bf7c7 )
by Caen
02:49
created
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/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/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/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Hyde\Framework\HydeKernel;
4 4
 
5
-if (! function_exists('hyde')) {
5
+if (!function_exists('hyde')) {
6 6
     /**
7 7
      * Get the available HydeKernel instance.
8 8
      *
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     }
15 15
 }
16 16
 
17
-if (! function_exists('unslash')) {
17
+if (!function_exists('unslash')) {
18 18
     /**
19 19
      * Remove trailing slashes from the start and end of a string.
20 20
      *
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         /*
18 18
          * Enable auto-discovery.
19 19
          */
20
-        $this->app->singleton(PackageManifest::class, function () {
20
+        $this->app->singleton(PackageManifest::class, function() {
21 21
             return new PackageManifest(
22 22
                 new Filesystem,
23 23
                 $this->basePath(),
Please login to merge, or discard this patch.
packages/framework/src/Helpers/Includes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $path = static::path($filename);
26 26
 
27
-        if (! file_exists($path)) {
27
+        if (!file_exists($path)) {
28 28
             return $default;
29 29
         }
30 30
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $path = static::path(basename($filename, '.md').'.md');
38 38
 
39
-        if (! file_exists($path)) {
39
+        if (!file_exists($path)) {
40 40
             return $default === null ? null : Markdown::render($default);
41 41
         }
42 42
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $path = static::path(basename($filename, '.blade.php').'.blade.php');
50 50
 
51
-        if (! file_exists($path)) {
51
+        if (!file_exists($path)) {
52 52
             return $default === null ? null : Blade::render($default);
53 53
         }
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     protected static function needsDirectory(string $directory): void
59 59
     {
60
-        if (! file_exists($directory)) {
60
+        if (!file_exists($directory)) {
61 61
             mkdir($directory, recursive: true);
62 62
         }
63 63
     }
Please login to merge, or discard this patch.
packages/framework/src/Models/Navigation/NavigationMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
     /** @return $this */
30 30
     public function generate(): static
31 31
     {
32
-        Hyde::routes()->each(function (Route $route) {
32
+        Hyde::routes()->each(function(Route $route) {
33 33
             $this->items->push(NavItem::fromRoute($route));
34 34
         });
35 35
 
36
-        collect(config('hyde.navigation.custom', []))->each(function (NavItem $item) {
36
+        collect(config('hyde.navigation.custom', []))->each(function(NavItem $item) {
37 37
             $this->items->push($item);
38 38
         });
39 39
 
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function filterHiddenItems(): Collection
61 61
     {
62
-        return $this->items->reject(function (NavItem $item) {
62
+        return $this->items->reject(function(NavItem $item) {
63 63
             return $item->hidden;
64 64
         })->values();
65 65
     }
66 66
 
67 67
     protected function filterDuplicateItems(): Collection
68 68
     {
69
-        return $this->items->unique(function (NavItem $item) {
69
+        return $this->items->unique(function(NavItem $item) {
70 70
             return $item->resolveLink();
71 71
         });
72 72
     }
Please login to merge, or discard this patch.
packages/framework/src/Models/Navigation/NavItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $route,
52 52
             $route->getSourceModel()->navigationMenuTitle(),
53 53
             $route->getSourceModel()->navigationMenuPriority(),
54
-            ! $route->getSourceModel()->showInNavigation()
54
+            !$route->getSourceModel()->showInNavigation()
55 55
         );
56 56
     }
57 57
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $current = Hyde::currentRoute()->getSourceModel();
97 97
         }
98 98
 
99
-        if (! isset($this->route)) {
99
+        if (!isset($this->route)) {
100 100
             return ($current->getRoute()->getRouteKey() === $this->href)
101 101
             || ($current->getRoute()->getRouteKey().'.html' === $this->href);
102 102
         }
Please login to merge, or discard this patch.