Passed
Push — master ( a2df39...476025 )
by Caen
05:35 queued 01:26
created
packages/framework/src/Framework/Services/ValidationService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function check_documentation_site_has_an_index_page(Result $result): Result
78 78
     {
79
-        if (! Features::hasDocumentationPages()) {
79
+        if (!Features::hasDocumentationPages()) {
80 80
             return $result->skip('Does documentation site have an index page?')
81 81
                 ->withTip('Skipped because: The documentation page feature is disabled in config');
82 82
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
     public function check_a_torchlight_api_token_is_set(Result $result): Result
124 124
     {
125
-        if (! Features::enabled(Feature::Torchlight)) {
125
+        if (!Features::enabled(Feature::Torchlight)) {
126 126
             return $result->skip('Check a Torchlight API token is set')
127 127
                 ->withTip('Torchlight is an API for code syntax highlighting. You can enable it in the Hyde config.');
128 128
         }
Please login to merge, or discard this patch.
packages/framework/src/Pages/Concerns/HydePage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function files(): array
134 134
     {
135
-        return Files::getFiles(static::class)->map(function (SourceFile $file): string {
135
+        return Files::getFiles(static::class)->map(function(SourceFile $file): string {
136 136
             return static::pathToIdentifier($file->getPath());
137 137
         })->values()->toArray();
138 138
     }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     public function showInNavigation(): bool
372 372
     {
373
-        return ! $this->navigation->hidden;
373
+        return !$this->navigation->hidden;
374 374
     }
375 375
 
376 376
     /**
@@ -402,11 +402,11 @@  discard block
 block discarded – undo
402 402
         /** @var ?string $value */
403 403
         $value = $this->matter('canonicalUrl');
404 404
 
405
-        if (! empty($value)) {
405
+        if (!empty($value)) {
406 406
             return $value;
407 407
         }
408 408
 
409
-        if (Hyde::hasSiteUrl() && ! empty($this->identifier)) {
409
+        if (Hyde::hasSiteUrl() && !empty($this->identifier)) {
410 410
             return Hyde::url($this->getOutputPath());
411 411
         }
412 412
 
Please login to merge, or discard this patch.
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/realtime-compiler/tests/RealtimeCompilerTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
 
12 12
 define('BASE_PATH', realpath(__DIR__.'/../../../'));
13 13
 
14
-if (BASE_PATH === false || ! file_exists(BASE_PATH.'/hyde')) {
14
+if (BASE_PATH === false || !file_exists(BASE_PATH.'/hyde')) {
15 15
     throw new InvalidArgumentException('This test suite must be run from the root of the hydephp/develop monorepo.');
16 16
 }
17 17
 
18 18
 ob_start();
19 19
 
20
-beforeEach(function () {
20
+beforeEach(function() {
21 21
     putenv('SERVER_LIVE_EDIT=false');
22 22
 });
23 23
 
24
-it('handles routes index page', function () {
24
+it('handles routes index page', function() {
25 25
     putenv('SERVER_DASHBOARD=false');
26 26
     mockRoute('');
27 27
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     Filesystem::unlink('_site/index.html');
41 41
 });
42 42
 
43
-it('handles routes custom pages', function () {
43
+it('handles routes custom pages', function() {
44 44
     mockRoute('foo');
45 45
 
46 46
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     Filesystem::unlink('_site/foo.html');
59 59
 });
60 60
 
61
-it('handles routes pages with .html extension', function () {
61
+it('handles routes pages with .html extension', function() {
62 62
     mockRoute('foo.html');
63 63
 
64 64
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     Filesystem::unlink('_site/foo.html');
77 77
 });
78 78
 
79
-it('handles routes static assets', function () {
79
+it('handles routes static assets', function() {
80 80
     mockRoute('media/app.css');
81 81
 
82 82
     $kernel = new HttpKernel();
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
     expect($response->body)->toBe(file_get_contents(\Hyde\Hyde::path('_media/app.css')));
90 90
 });
91 91
 
92
-it('handles throws route not found exception for missing route', function () {
92
+it('handles throws route not found exception for missing route', function() {
93 93
     mockRoute('missing');
94 94
 
95 95
     $kernel = new HttpKernel();
96 96
     $kernel->handle(new Request());
97 97
 })->throws(RouteNotFoundException::class, 'Route [missing] not found');
98 98
 
99
-it('handles sends 404 error response for missing asset', function () {
99
+it('handles sends 404 error response for missing asset', function() {
100 100
     mockRoute('missing.css');
101 101
 
102 102
     $kernel = new HttpKernel();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 //    Filesystem::unlink('_site/foo.html');
128 128
 //})->skip('Underlying framework does not buffer headers (yet)');
129 129
 
130
-test('trailing slashes are normalized from route', function () {
130
+test('trailing slashes are normalized from route', function() {
131 131
     mockRoute('foo/');
132 132
 
133 133
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     Filesystem::unlink('_site/foo.html');
146 146
 });
147 147
 
148
-test('docs uri path is rerouted to docs/index', function () {
148
+test('docs uri path is rerouted to docs/index', function() {
149 149
     mockRoute('docs');
150 150
 
151 151
     Filesystem::put('_docs/index.md', '# Hello World!');
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     Filesystem::unlink('_site/docs/index.html');
164 164
 });
165 165
 
166
-test('docs/search renders search page', function () {
166
+test('docs/search renders search page', function() {
167 167
     mockRoute('docs/search');
168 168
 
169 169
     $kernel = new HttpKernel();
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     Filesystem::unlink('_site/docs/search.html');
179 179
 });
180 180
 
181
-test('ping route returns ping response', function () {
181
+test('ping route returns ping response', function() {
182 182
     mockRoute('ping');
183 183
 
184 184
     $kernel = new HttpKernel();
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         ->and($response->statusMessage)->toBe('OK');
190 190
 });
191 191
 
192
-test('exception handling', function () {
192
+test('exception handling', function() {
193 193
     $exception = new Exception('foo');
194 194
     $response = ExceptionHandler::handle($exception);
195 195
 
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.