Skip to content

Commit 287aed2

Browse files
fix: add type checking for command options to satisfy PHPStan Level 9
- Add is_string() type guards for queue and connection options - Prevents PHPStan errors when passing array|string|true to string parameters - Ensures type safety for calculateSpecificBaseline() method call
1 parent 1d77d39 commit 287aed2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Commands/CalculateBaselinesCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function handle(CalculateBaselinesAction $action): int
3737
}
3838

3939
$isDryRun = (bool) $this->option('dry-run');
40-
$specificQueue = $this->option('queue');
41-
$specificConnection = $this->option('connection');
40+
$specificQueue = is_string($this->option('queue')) ? $this->option('queue') : null;
41+
$specificConnection = is_string($this->option('connection')) ? $this->option('connection') : null;
4242

4343
if ($isDryRun) {
4444
$this->warn('DRY RUN MODE - No baselines will be calculated');

0 commit comments

Comments
 (0)