@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected function getEnvironmentVariables(): array |
| 77 | 77 | { |
| 78 | 78 | return Arr::whereNotNull([ |
| 79 | - 'HYDE_SERVER_REQUEST_OUTPUT' => ! $this->option('no-ansi'), |
|
| 79 | + 'HYDE_SERVER_REQUEST_OUTPUT' => !$this->option('no-ansi'), |
|
| 80 | 80 | 'HYDE_SERVER_SAVE_PREVIEW' => $this->parseEnvironmentOption('save-preview'), |
| 81 | 81 | 'HYDE_SERVER_DASHBOARD' => $this->parseEnvironmentOption('dashboard'), |
| 82 | 82 | 'HYDE_PRETTY_URLS' => $this->parseEnvironmentOption('pretty-urls'), |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | protected function configureOutput(): void |
| 88 | 88 | { |
| 89 | - if (! $this->useBasicOutput()) { |
|
| 89 | + if (!$this->useBasicOutput()) { |
|
| 90 | 90 | $this->console = new ConsoleOutput($this->output->isVerbose()); |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | protected function getOutputHandler(): Closure |
| 102 | 102 | { |
| 103 | - return $this->useBasicOutput() ? function (string $type, string $line): void { |
|
| 103 | + return $this->useBasicOutput() ? function(string $type, string $line): void { |
|
| 104 | 104 | $this->output->write($line); |
| 105 | 105 | } : $this->console->getFormatter(); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | protected function useBasicOutput(): bool |
| 109 | 109 | { |
| 110 | - return $this->option('no-ansi') || ! class_exists(ConsoleOutput::class); |
|
| 110 | + return $this->option('no-ansi') || !class_exists(ConsoleOutput::class); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | protected function parseEnvironmentOption(string $name): ?string |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | uses(\Hyde\Testing\UnitTestCase::class); |
| 10 | 10 | |
| 11 | -beforeEach(function () { |
|
| 11 | +beforeEach(function() { |
|
| 12 | 12 | renderUsing($this->output = new BufferedOutput()); |
| 13 | 13 | |
| 14 | 14 | $this::mockConfig(); |
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | -afterEach(function () { |
|
| 17 | +afterEach(function() { |
|
| 18 | 18 | renderUsing(null); |
| 19 | 19 | |
| 20 | 20 | Styles::flush(); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | HydeKernel::setInstance(new HydeKernel()); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | -test('printStartMessage method', function () { |
|
| 25 | +test('printStartMessage method', function() { |
|
| 26 | 26 | HydeKernel::setInstance(new class extends HydeKernel |
| 27 | 27 | { |
| 28 | 28 | public static function version(): string |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $lineLength = max(array_map('strlen', array_map('strip_tags', $lines))); |
| 42 | 42 | |
| 43 | - $lines = array_map(function (string $line) use ($lineLength): string { |
|
| 43 | + $lines = array_map(function(string $line) use ($lineLength): string { |
|
| 44 | 44 | return sprintf(' ā <span class="text-white">%s</span>%sā', |
| 45 | 45 | $line, str_repeat(' ', ($lineLength - strlen(strip_tags($line))) + 1) |
| 46 | 46 | ); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | public function getFormatter(): Closure |
| 58 | 58 | { |
| 59 | - return function (string $type, string $line): void { |
|
| 59 | + return function(string $type, string $line): void { |
|
| 60 | 60 | $this->handleOutput($line); |
| 61 | 61 | }; |
| 62 | 62 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | protected function handleOutput(string $buffer): void |
| 71 | 71 | { |
| 72 | - str($buffer)->trim()->explode("\n")->each(function (string $line): void { |
|
| 72 | + str($buffer)->trim()->explode("\n")->each(function(string $line): void { |
|
| 73 | 73 | $this->renderLine($this->formatLineForOutput($line)); |
| 74 | 74 | }); |
| 75 | 75 | } |