Passed
Push — master ( a9db05...32ab90 )
by Caen
03:20 queued 13s
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 v2.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/Concerns/HydePage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public static function files(): array
120 120
     {
121
-        return Files::getSourceFiles(static::class)->map(function (SourceFile $file): string {
121
+        return Files::getSourceFiles(static::class)->map(function(SourceFile $file): string {
122 122
             return DiscoveryService::pathToIdentifier(static::class, $file->getPath());
123 123
         })->values()->toArray();
124 124
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
     public function showInNavigation(): bool
325 325
     {
326
-        return ! $this->navigation['hidden'];
326
+        return !$this->navigation['hidden'];
327 327
     }
328 328
 
329 329
     public function navigationMenuPriority(): int
Please login to merge, or discard this patch.
packages/framework/src/Framework/Services/BuildService.php 1 patch
Spacing   +4 added lines, -4 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
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $this->needsDirectory(Hyde::siteMediaPath());
52 52
 
53 53
         $this->comment('Transferring Media Assets...');
54
-        $this->withProgressBar(MediaFile::files(), function (string $identifier): void {
54
+        $this->withProgressBar(MediaFile::files(), function(string $identifier): void {
55 55
             $sitePath = Hyde::siteMediaPath($identifier);
56 56
             $this->needsParentDirectory($sitePath);
57 57
             copy(Hyde::mediaPath($identifier), $sitePath);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $collection = Routes::getRoutes($pageClass);
71 71
 
72
-        $this->withProgressBar($collection, function (Route $route): void {
72
+        $this->withProgressBar($collection, function(Route $route): void {
73 73
             (new StaticPageBuilder($route->getPage()))->__invoke();
74 74
         });
75 75
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     /** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */
85 85
     protected function getPageTypes(): array
86 86
     {
87
-        return Hyde::pages()->map(function (HydePage $page): string {
87
+        return Hyde::pages()->map(function(HydePage $page): string {
88 88
             return $page::class;
89 89
         })->unique()->values()->toArray();
90 90
     }
Please login to merge, or discard this patch.
packages/framework/src/Support/Filesystem/MediaFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function getContentLength(): int
57 57
     {
58
-        if (! is_file($this->getAbsolutePath())) {
58
+        if (!is_file($this->getAbsolutePath())) {
59 59
             throw new FileNotFoundException(message: "Could not get the content length of file [$this->path]");
60 60
         }
61 61
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     protected static function discoverMediaAssetFiles(): array
98 98
     {
99
-        return collect(static::getMediaAssetFiles())->mapWithKeys(function (string $filepath): array {
99
+        return collect(static::getMediaAssetFiles())->mapWithKeys(function(string $filepath): array {
100 100
             $file = static::make($filepath);
101 101
 
102 102
             return [$file->getIdentifier() => $file];
Please login to merge, or discard this patch.