Passed
Branch master (0511c6)
by Caen
03:10
created
packages/realtime-compiler/tests/RealtimeCompilerTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  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
-test('handle routes index page', function () {
20
+test('handle routes index page', function() {
21 21
     putenv('SERVER_DASHBOARD=false');
22 22
     mockRoute('');
23 23
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     Filesystem::unlink('_site/index.html');
37 37
 });
38 38
 
39
-test('handle routes custom pages', function () {
39
+test('handle routes custom pages', function() {
40 40
     mockRoute('foo');
41 41
 
42 42
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     Filesystem::unlink('_site/foo.html');
55 55
 });
56 56
 
57
-test('handle routes pages with .html extension', function () {
57
+test('handle routes pages with .html extension', function() {
58 58
     mockRoute('foo.html');
59 59
 
60 60
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     Filesystem::unlink('_site/foo.html');
73 73
 });
74 74
 
75
-test('handle routes static assets', function () {
75
+test('handle routes static assets', function() {
76 76
     mockRoute('media/app.css');
77 77
 
78 78
     $kernel = new HttpKernel();
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
     expect($response->body)->toContain('/*! HydeFront v3.0.0');
86 86
 });
87 87
 
88
-test('handle throws route not found exception for missing route', function () {
88
+test('handle throws route not found exception for missing route', function() {
89 89
     mockRoute('missing');
90 90
 
91 91
     $kernel = new HttpKernel();
92 92
     $kernel->handle(new Request());
93 93
 })->throws(RouteNotFoundException::class, 'Route [missing] not found');
94 94
 
95
-test('handle sends 404 error response for missing asset', function () {
95
+test('handle sends 404 error response for missing asset', function() {
96 96
     mockRoute('missing.css');
97 97
 
98 98
     $kernel = new HttpKernel();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 //    Filesystem::unlink('_site/foo.html');
124 124
 //})->skip('Underlying framework does not buffer headers (yet)');
125 125
 
126
-test('trailing slashes are normalized from route', function () {
126
+test('trailing slashes are normalized from route', function() {
127 127
     mockRoute('foo/');
128 128
 
129 129
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     Filesystem::unlink('_site/foo.html');
142 142
 });
143 143
 
144
-test('docs uri path is rerouted to docs/index', function () {
144
+test('docs uri path is rerouted to docs/index', function() {
145 145
     mockRoute('docs');
146 146
 
147 147
     Filesystem::put('_docs/index.md', '# Hello World!');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     Filesystem::unlink('_site/docs/index.html');
160 160
 });
161 161
 
162
-test('docs/search renders search page', function () {
162
+test('docs/search renders search page', function() {
163 163
     mockRoute('docs/search');
164 164
 
165 165
     $kernel = new HttpKernel();
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     Filesystem::unlink('_site/docs/search.html');
175 175
 });
176 176
 
177
-test('ping route returns ping response', function () {
177
+test('ping route returns ping response', function() {
178 178
     mockRoute('ping');
179 179
 
180 180
     $kernel = new HttpKernel();
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         ->and($response->statusMessage)->toBe('OK');
186 186
 });
187 187
 
188
-test('exception handling', function () {
188
+test('exception handling', function() {
189 189
     $exception = new Exception('foo');
190 190
     $response = ExceptionHandler::handle($exception);
191 191
 
Please login to merge, or discard this patch.
packages/framework/src/Pages/MarkdownPost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     /** @return \Hyde\Foundation\Kernel\PageCollection<\Hyde\Pages\MarkdownPost> */
36 36
     public static function getLatestPosts(): PageCollection
37 37
     {
38
-        return static::all()->sortByDesc(function (self $post): int {
38
+        return static::all()->sortByDesc(function(self $post): int {
39 39
             return $post->date?->dateTimeObject->getTimestamp() ?? 0;
40 40
         });
41 41
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     /** @return \Illuminate\Support\Collection<\Hyde\Framework\Features\Blogging\Models\PostAuthor> */
73 73
     public static function all(): Collection
74 74
     {
75
-        return (new Collection(Config::getArray('hyde.authors', [])))->mapWithKeys(function (self $author): array {
75
+        return (new Collection(Config::getArray('hyde.authors', [])))->mapWithKeys(function(self $author): array {
76 76
             return [strtolower($author->username) => $author];
77 77
         });
78 78
     }
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
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public static function files(): array
135 135
     {
136
-        return Files::getFiles(static::class)->map(function (SourceFile $file): string {
136
+        return Files::getFiles(static::class)->map(function(SourceFile $file): string {
137 137
             return static::pathToIdentifier($file->getPath());
138 138
         })->values()->toArray();
139 139
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      */
372 372
     public function showInNavigation(): bool
373 373
     {
374
-        return ! $this->navigation->hidden;
374
+        return !$this->navigation->hidden;
375 375
     }
376 376
 
377 377
     /**
@@ -400,11 +400,11 @@  discard block
 block discarded – undo
400 400
 
401 401
     public function getCanonicalUrl(): ?string
402 402
     {
403
-        if (! empty($this->matter('canonicalUrl'))) {
403
+        if (!empty($this->matter('canonicalUrl'))) {
404 404
             return $this->matter('canonicalUrl');
405 405
         }
406 406
 
407
-        if (Hyde::hasSiteUrl() && ! empty($this->identifier)) {
407
+        if (Hyde::hasSiteUrl() && !empty($this->identifier)) {
408 408
             return Hyde::url($this->getOutputPath());
409 409
         }
410 410
 
Please login to merge, or discard this patch.