Passed
Push — master ( e37f2c...989b30 )
by Caen
03:20 queued 12s
created
rector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 use Rector\Set\ValueObject\SetList;
8 8
 use RectorLaravel\Set\LaravelSetList;
9 9
 
10
-return static function (RectorConfig $rectorConfig): void {
10
+return static function(RectorConfig $rectorConfig): void {
11 11
     $rectorConfig->paths([__DIR__.'/packages/framework/src']);
12 12
     $rectorConfig->sets([
13 13
         LaravelSetList::LARAVEL_90,
Please login to merge, or discard this patch.
packages/framework/src/helpers.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 namespace {
6 6
     use Hyde\Foundation\HydeKernel;
7 7
 
8
-    if (! function_exists('hyde')) {
8
+    if (!function_exists('hyde')) {
9 9
         /**
10 10
          * Get the available HydeKernel instance.
11 11
          */
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         }
16 16
     }
17 17
 
18
-    if (! function_exists('unslash')) {
18
+    if (!function_exists('unslash')) {
19 19
         /**
20 20
          * Remove trailing slashes from the start and end of a string.
21 21
          */
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     use Hyde\Foundation\HydeKernel;
31 31
     use Illuminate\Contracts\Support\Arrayable;
32 32
 
33
-    if (! function_exists('\Hyde\hyde')) {
33
+    if (!function_exists('\Hyde\hyde')) {
34 34
         /**
35 35
          * Get the available HydeKernel instance.
36 36
          */
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         }
41 41
     }
42 42
 
43
-    if (! function_exists('\Hyde\unslash')) {
43
+    if (!function_exists('\Hyde\unslash')) {
44 44
         /**
45 45
          * Remove trailing slashes from the start and end of a string.
46 46
          */
@@ -50,35 +50,35 @@  discard block
 block discarded – undo
50 50
         }
51 51
     }
52 52
 
53
-    if (! function_exists('\Hyde\make_title')) {
53
+    if (!function_exists('\Hyde\make_title')) {
54 54
         function make_title(string $value): string
55 55
         {
56 56
             return hyde()->makeTitle($value);
57 57
         }
58 58
     }
59 59
 
60
-    if (! function_exists('\Hyde\normalize_newlines')) {
60
+    if (!function_exists('\Hyde\normalize_newlines')) {
61 61
         function normalize_newlines(string $string): string
62 62
         {
63 63
             return hyde()->normalizeNewlines($string);
64 64
         }
65 65
     }
66 66
 
67
-    if (! function_exists('\Hyde\strip_newlines')) {
67
+    if (!function_exists('\Hyde\strip_newlines')) {
68 68
         function strip_newlines(string $string): string
69 69
         {
70 70
             return hyde()->stripNewlines($string);
71 71
         }
72 72
     }
73 73
 
74
-    if (! function_exists('\Hyde\trim_slashes')) {
74
+    if (!function_exists('\Hyde\trim_slashes')) {
75 75
         function trim_slashes(string $string): string
76 76
         {
77 77
             return hyde()->trimSlashes($string);
78 78
         }
79 79
     }
80 80
 
81
-    if (! function_exists('\Hyde\evaluate_arrayable')) {
81
+    if (!function_exists('\Hyde\evaluate_arrayable')) {
82 82
         function evaluate_arrayable(array|Arrayable $array): array
83 83
         {
84 84
             return $array instanceof Arrayable ? $array->toArray() : $array;
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
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function getPages(?string $pageClass = null): self
38 38
     {
39
-        return ! $pageClass ? $this : $this->filter(function (HydePage $page) use ($pageClass): bool {
39
+        return !$pageClass ? $this : $this->filter(function(HydePage $page) use ($pageClass) : bool {
40 40
             return $page instanceof $pageClass;
41 41
         });
42 42
     }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     protected function discoverPagesFor(string $pageClass): void
95 95
     {
96
-        $this->parsePagesFor($pageClass)->each(function (HydePage $page): void {
96
+        $this->parsePagesFor($pageClass)->each(function(HydePage $page): void {
97 97
             $this->addPage($page);
98 98
         });
99 99
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Services/BuildService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function compileStaticPages(): void
43 43
     {
44
-        collect($this->getPageTypes())->each(function (string $pageClass): void {
44
+        collect($this->getPageTypes())->each(function(string $pageClass): void {
45 45
             $this->compilePagesForClass($pageClass);
46 46
         });
47 47
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->needsDirectory(Hyde::sitePath('media'));
64 64
 
65 65
         $this->comment('Transferring Media Assets...');
66
-        $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function (string $filepath): void {
66
+        $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function(string $filepath): void {
67 67
             $sitePath = Hyde::sitePath('media/'.unslash(Str::after($filepath, Hyde::path('_media'))));
68 68
             $this->needsParentDirectory($sitePath);
69 69
             copy($filepath, $sitePath);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $collection = $this->router->getRoutes($pageClass);
83 83
 
84
-        $this->withProgressBar($collection, function (Route $route): void {
84
+        $this->withProgressBar($collection, function(Route $route): void {
85 85
             (new StaticPageBuilder($route->getPage()))->__invoke();
86 86
         });
87 87
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     protected function isItSafeToCleanOutputDirectory(): bool
97 97
     {
98
-        if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) {
98
+        if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) {
99 99
             $this->info('Output directory will not be emptied.');
100 100
 
101 101
             return false;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     /** @return array<class-string<\Hyde\Pages\Concerns\HydePage> */
127 127
     protected function getPageTypes(): array
128 128
     {
129
-        return Hyde::pages()->map(function (HydePage $page): string {
129
+        return Hyde::pages()->map(function(HydePage $page): string {
130 130
             return $page::class;
131 131
         })->unique()->values()->toArray();
132 132
     }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Concerns/BootsHydeKernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function boot(): void
22 22
     {
23
-        if (! $this->readyToBoot || $this->booting) {
23
+        if (!$this->readyToBoot || $this->booting) {
24 24
             return;
25 25
         }
26 26
 
Please login to merge, or discard this patch.
packages/framework/src/Framework/Concerns/ValidatesExistence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         /** @var \Hyde\Pages\Concerns\HydePage $model */
25 25
         $filepath = $model::sourcePath($identifier);
26 26
 
27
-        if (! file_exists(Hyde::path($filepath))) {
27
+        if (!file_exists(Hyde::path($filepath))) {
28 28
             throw new FileNotFoundException($filepath);
29 29
         }
30 30
     }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Concerns/ManagesHydeKernel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             throw new BadMethodCallException('Cannot register a page class after the Kernel has been booted.');
74 74
         }
75 75
 
76
-        if (! is_subclass_of($pageClass, HydePage::class)) {
76
+        if (!is_subclass_of($pageClass, HydePage::class)) {
77 77
             throw new InvalidArgumentException('The specified class must be a subclass of HydePage.');
78 78
         }
79 79
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             throw new InvalidArgumentException('The specified class must not be a subclass of DynamicPage.');
82 82
         }
83 83
 
84
-        if (! in_array($pageClass, $this->pageClasses, true)) {
84
+        if (!in_array($pageClass, $this->pageClasses, true)) {
85 85
             $this->pageClasses[] = $pageClass;
86 86
         }
87 87
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /** @param class-string<\Hyde\Foundation\Concerns\HydeExtension>  $extension */
96 96
     public function registerExtension(string $extension): void
97 97
     {
98
-        if (! in_array($extension, $this->extensions, true)) {
98
+        if (!in_array($extension, $this->extensions, true)) {
99 99
             $this->extensions[] = $extension;
100 100
         }
101 101
     }
Please login to merge, or discard this patch.
packages/framework/src/Pages/VirtualPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             return $this->__call('compile', []);
90 90
         }
91 91
 
92
-        if (! $this->contents && $this->view) {
92
+        if (!$this->contents && $this->view) {
93 93
             if (str_ends_with($this->view, '.blade.php')) {
94 94
                 return AnonymousViewCompiler::call($this->view, $this->matter->toArray());
95 95
             }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function __call(string $method, array $parameters): mixed
115 115
     {
116
-        if (! isset($this->macros[$method])) {
116
+        if (!isset($this->macros[$method])) {
117 117
             throw new BadMethodCallException(sprintf(
118 118
                 'Method %s::%s does not exist.', static::class, $method
119 119
             ));
Please login to merge, or discard this patch.