From 1f5cb5149fe5e517cd385957de8024448bb99871 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 12 Nov 2023 13:16:01 +0100 Subject: [PATCH] Cleanup code --- packages/realtime-compiler/src/ConsoleOutput.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/realtime-compiler/src/ConsoleOutput.php b/packages/realtime-compiler/src/ConsoleOutput.php index 7b1f768b209..8e33beebca1 100644 --- a/packages/realtime-compiler/src/ConsoleOutput.php +++ b/packages/realtime-compiler/src/ConsoleOutput.php @@ -28,16 +28,15 @@ public function printStartMessage(string $host, int $port, array $environment): { $url = sprintf('%s://%s:%d', $port === 443 ? 'https' : 'http', $host, $port); - $isDashboardEnabled = (config('hyde.server.dashboard.enabled') || Arr::has($environment, 'HYDE_SERVER_DASHBOARD')) && Arr::get($environment, 'HYDE_SERVER_DASHBOARD') === 'enabled'; - $lines = Arr::whereNotNull([ + $lines = [ '', sprintf('%s %s', 'HydePHP Realtime Compiler', 'v'.Hyde::getInstance()->version()), '', sprintf('Listening on: %s', $url, $url), - $isDashboardEnabled ? + (config('hyde.server.dashboard.enabled') || Arr::has($environment, 'HYDE_SERVER_DASHBOARD')) && Arr::get($environment, 'HYDE_SERVER_DASHBOARD') === 'enabled' ? sprintf('Live dashboard: %s/dashboard', $url, $url) : null, '', - ]); + ]; $lineLength = max(array_map('strlen', array_map('strip_tags', $lines)));