From f1d062295fb86f8ec47e0de1cda5f194bdecabbd Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Tue, 13 Feb 2024 08:58:29 +0100 Subject: [PATCH] Fix psalm warning --- src/Psalm/Internal/Cli/Psalm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Cli/Psalm.php b/src/Psalm/Internal/Cli/Psalm.php index 6a9a7bb5ed0..d2aac75671f 100644 --- a/src/Psalm/Internal/Cli/Psalm.php +++ b/src/Psalm/Internal/Cli/Psalm.php @@ -651,8 +651,8 @@ private static function generateBaseline( ): array { fwrite(STDERR, 'Writing error baseline to file...' . PHP_EOL); - $errorBaseline = ((string) $options['set-baseline']) - ?: $config->error_baseline ?: Config::DEFAULT_BASELINE_NAME; + $errorBaseline = is_string($options['set-baseline']) ? $options['set-baseline'] : + ($config->error_baseline ?: Config::DEFAULT_BASELINE_NAME); try { $issue_baseline = ErrorBaseline::read(