@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $this->timeStart = microtime(true); |
67 | 67 | |
68 | - if (! $this->option('json')) { |
|
68 | + if (!$this->option('json')) { |
|
69 | 69 | $this->title('Validating publications!'); |
70 | 70 | } |
71 | 71 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $name = $this->argument('publicationType'); |
100 | 100 | |
101 | 101 | if (filled($name)) { |
102 | - if (! $publicationTypes->has($name)) { |
|
102 | + if (!$publicationTypes->has($name)) { |
|
103 | 103 | throw new InvalidArgumentException("Publication type [$name] does not exist"); |
104 | 104 | } |
105 | 105 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | protected function getMessageTypesInResult(array $results): array |
183 | 183 | { |
184 | - return array_map(function (string $result): string { |
|
184 | + return array_map(function(string $result): string { |
|
185 | 185 | return explode(':', $result)[0]; |
186 | 186 | }, array_values($results)); |
187 | 187 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $timeStart = microtime(true); |
47 | 47 | |
48 | - if (! $this->option('json')) { |
|
48 | + if (!$this->option('json')) { |
|
49 | 49 | $this->title('Validating publication schemas!'); |
50 | 50 | } |
51 | 51 |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | if ($this->request->method === 'POST') { |
82 | 82 | $this->isAsync = (getallheaders()['X-RC-Handler'] ?? getallheaders()['x-rc-handler'] ?? null) === 'Async'; |
83 | 83 | |
84 | - if (! $this->isInteractive()) { |
|
84 | + if (!$this->isInteractive()) { |
|
85 | 85 | $this->abort(403, 'Enable `server.editor` in `config/hyde.php` to use interactive dashboard features.'); |
86 | 86 | } |
87 | 87 | |
88 | 88 | try { |
89 | 89 | $this->handlePostRequest(); |
90 | 90 | } catch (HttpException $exception) { |
91 | - if (! $this->isAsync) { |
|
91 | + if (!$this->isAsync) { |
|
92 | 92 | throw $exception; |
93 | 93 | } |
94 | 94 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | return new HtmlString(substr($contents, 0, 800)); |
187 | 187 | } |
188 | 188 | |
189 | - $highlighted = str($contents)->explode("\n")->slice(0, 25)->map(function (string $line): string { |
|
189 | + $highlighted = str($contents)->explode("\n")->slice(0, 25)->map(function(string $line): string { |
|
190 | 190 | $line = rtrim($line); |
191 | 191 | |
192 | 192 | if (str_starts_with($line, '//')) { |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $binary = $this->findGeneralOpenBinary(); |
316 | 316 | $path = Hyde::path($page->getSourcePath()); |
317 | 317 | |
318 | - if (! (str_ends_with($path, '.md') || str_ends_with($path, '.blade.php'))) { |
|
318 | + if (!(str_ends_with($path, '.md') || str_ends_with($path, '.blade.php'))) { |
|
319 | 319 | $this->abort(403, sprintf("Refusing to open unsafe file '%s'", basename($path))); |
320 | 320 | } |
321 | 321 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $binary = $this->findGeneralOpenBinary(); |
330 | 330 | $path = $file->getAbsolutePath(); |
331 | 331 | |
332 | - if (! in_array($file->getExtension(), ['png', 'svg', 'jpg', 'jpeg', 'gif', 'ico', 'css', 'js'])) { |
|
332 | + if (!in_array($file->getExtension(), ['png', 'svg', 'jpg', 'jpeg', 'gif', 'ico', 'css', 'js'])) { |
|
333 | 333 | $this->abort(403, sprintf("Refusing to open unsafe file '%s'", basename($path))); |
334 | 334 | } |
335 | 335 |