Passed
Push — master ( b6f457...706a45 )
by Caen
03:44 queued 17s
created
framework/src/Framework/Concerns/Internal/ForwardsIlluminateFilesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     /** @param  string[]  $parameterNames */
89 89
     protected static function qualifyArguments(array $parameterNames, array $arguments): Collection
90 90
     {
91
-        return collect($arguments)->mapWithKeys(function (string|array|int|bool $argumentValue, int|string $key) use ($parameterNames): string|array|int|bool {
91
+        return collect($arguments)->mapWithKeys(function(string|array|int|bool $argumentValue, int|string $key) use ($parameterNames): string|array|int|bool {
92 92
             $argumentsToQualify = ['path', 'paths', 'file', 'target', 'directory', 'destination', 'firstFile', 'secondFile', 'pattern', 'link', 'from', 'to'];
93 93
 
94 94
             if (is_int($key)) {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     protected static function qualifyPathArgument(array|string $path): string|array
108 108
     {
109 109
         return is_array($path)
110
-            ? array_map(fn (string $path): string => self::qualifyPathArgument($path), $path)
110
+            ? array_map(fn (string $path) : string => self::qualifyPathArgument($path), $path)
111 111
             : self::absolutePath($path);
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Internal/LoadConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /** Get all the configuration files for the application. */
20 20
     protected function getConfigurationFiles(Application $app): array
21 21
     {
22
-        return (array) tap(parent::getConfigurationFiles($app), /** @param array<string, string> $files */ function (array &$files) use ($app): void {
22
+        return (array) tap(parent::getConfigurationFiles($app), /** @param array<string, string> $files */ function(array &$files) use ($app): void {
23 23
             // Inject our custom config file which is stored in `app/config.php`.
24 24
             $files['app'] ??= $app->basePath().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config.php';
25 25
         });
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/PublishHomepageCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $selected = $this->parseSelection();
56 56
 
57
-        if (! $this->canExistingFileBeOverwritten()) {
57
+        if (!$this->canExistingFileBeOverwritten()) {
58 58
             $this->error('A modified index.blade.php file already exists. Use --force to overwrite.');
59 59
 
60 60
             return 409;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     protected function formatPublishableChoices(): array
94 94
     {
95
-        return $this->getTemplateOptions()->map(function (array $option, string $key): string {
95
+        return $this->getTemplateOptions()->map(function(array $option, string $key): string {
96 96
             return  "<comment>$key</comment>: {$option['description']}";
97 97
         })->values()->toArray();
98 98
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             return true;
115 115
         }
116 116
 
117
-        if (! file_exists(BladePage::path('index.blade.php'))) {
117
+        if (!file_exists(BladePage::path('index.blade.php'))) {
118 118
             return true;
119 119
         }
120 120
 
Please login to merge, or discard this patch.
packages/framework/src/Support/Internal/RouteListItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,6 +98,6 @@
 block discarded – undo
98 98
 
99 99
     protected function isPageDiscoverable(): bool
100 100
     {
101
-        return filled($this->route->getSourcePath()) && ! $this->route->getPage() instanceof InMemoryPage;
101
+        return filled($this->route->getSourcePath()) && !$this->route->getPage() instanceof InMemoryPage;
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/ServeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     protected function getEnvironmentVariables(): array
83 83
     {
84 84
         return Arr::whereNotNull([
85
-            'HYDE_SERVER_REQUEST_OUTPUT' => ! $this->option('no-ansi'),
85
+            'HYDE_SERVER_REQUEST_OUTPUT' => !$this->option('no-ansi'),
86 86
             'HYDE_SERVER_SAVE_PREVIEW' => $this->parseEnvironmentOption('save-preview'),
87 87
             'HYDE_SERVER_DASHBOARD' => $this->parseEnvironmentOption('dashboard'),
88 88
             'HYDE_PRETTY_URLS' => $this->parseEnvironmentOption('pretty-urls'),
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     protected function configureOutput(): void
94 94
     {
95
-        if (! $this->useBasicOutput()) {
95
+        if (!$this->useBasicOutput()) {
96 96
             $this->console = new ConsoleOutput($this->output->isVerbose());
97 97
         }
98 98
     }
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
 
107 107
     protected function getOutputHandler(): Closure
108 108
     {
109
-        return $this->useBasicOutput() ? function (string $type, string $line): void {
109
+        return $this->useBasicOutput() ? function(string $type, string $line): void {
110 110
             $this->output->write($line);
111 111
         } : $this->console->getFormatter();
112 112
     }
113 113
 
114 114
     protected function useBasicOutput(): bool
115 115
     {
116
-        return $this->option('no-ansi') || ! class_exists(ConsoleOutput::class);
116
+        return $this->option('no-ansi') || !class_exists(ConsoleOutput::class);
117 117
     }
118 118
 
119 119
     protected function parseEnvironmentOption(string $name): ?string
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         $process = $binary ? Process::command($command)->run() : null;
159 159
 
160
-        if (! $process || $process->failed()) {
160
+        if (!$process || $process->failed()) {
161 161
             $this->warn('Unable to open the site preview in the browser on your system:');
162 162
             $this->line(sprintf('  %s', str_replace("\n", "\n  ", $process ? $process->errorOutput() : "Missing suitable 'open' binary.")));
163 163
             $this->newLine();
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Kernel/Filesystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function vendorPath(string $path = '', string $package = 'framework'): string
138 138
     {
139
-        if (PharSupport::running() && ! PharSupport::hasVendorDirectory()) {
139
+        if (PharSupport::running() && !PharSupport::hasVendorDirectory()) {
140 140
             return PharSupport::vendorPath($path, $package);
141 141
         }
142 142
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function touch(string|array $path): bool
152 152
     {
153
-        return collect($path)->map(function (string $path): bool {
153
+        return collect($path)->map(function(string $path): bool {
154 154
             return touch($this->path($path));
155 155
         })->contains(false) === false;
156 156
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function unlink(string|array $path): bool
164 164
     {
165
-        return collect($path)->map(function (string $path): bool {
165
+        return collect($path)->map(function(string $path): bool {
166 166
             return unlink($this->path($path));
167 167
         })->contains(false) === false;
168 168
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Navigation/NavigationMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
     /** @return array<string, DropdownNavItem> */
31 31
     public function getDropdowns(): array
32 32
     {
33
-        if (! $this->dropdownsEnabled()) {
33
+        if (!$this->dropdownsEnabled()) {
34 34
             throw new BadMethodCallException('Dropdowns are not enabled. Enable it by setting `hyde.navigation.subdirectories` to `dropdown`.');
35 35
         }
36 36
 
37
-        return $this->items->filter(function (NavItem $item): bool {
37
+        return $this->items->filter(function(NavItem $item): bool {
38 38
             return $item instanceof DropdownNavItem;
39 39
         })->values()->all();
40 40
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     protected function canAddRoute(Route $route): bool
63 63
     {
64
-        return parent::canAddRoute($route) && (! $route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName()));
64
+        return parent::canAddRoute($route) && (!$route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName()));
65 65
     }
66 66
 
67 67
     protected function canAddItemToDropdown(NavItem $item): bool
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     private function hasGroupExplicitlySetInFrontMatter(): bool
78 78
     {
79
-        return $this->hasDropdowns ??= $this->items->contains(function (NavItem $item): bool {
79
+        return $this->hasDropdowns ??= $this->items->contains(function(NavItem $item): bool {
80 80
             return ($item->getGroup() !== null) && ($item->destination !== (string) DocumentationPage::home());
81 81
         });
82 82
     }
Please login to merge, or discard this patch.
packages/testing/src/CreatesTemporaryFiles.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     protected function file(string $path, ?string $contents = null): void
24 24
     {
25
-        if (! is_dir(dirname($path))) {
25
+        if (!is_dir(dirname($path))) {
26 26
             $this->directory(dirname($path));
27 27
         }
28 28
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (sizeof($this->fileMemory) > 0) {
64 64
             foreach ($this->fileMemory as $file) {
65 65
                 if (Filesystem::isDirectory($file)) {
66
-                    if (! in_array($file, ['_site', '_media', '_pages', '_posts', '_docs', 'app', 'config', 'storage', 'vendor', 'node_modules'])) {
66
+                    if (!in_array($file, ['_site', '_media', '_pages', '_posts', '_docs', 'app', 'config', 'storage', 'vendor', 'node_modules'])) {
67 67
                         Filesystem::deleteDirectory($file);
68 68
                     }
69 69
                 } else {
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/RouteListCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         return match ($this->option('format')) {
32 32
             'txt' => $this->table($this->makeHeader($routes), $routes) ?? Command::SUCCESS,
33
-            'json' => $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) ?? Command::SUCCESS,
33
+            'json' => $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)) ?? Command::SUCCESS,
34 34
             default => $this->error("Invalid format provided. Only 'txt' and 'json' are supported.") ?? Command::FAILURE,
35 35
         };
36 36
     }
Please login to merge, or discard this patch.