Skip to content

Commit 2854b6d

Browse files
authored
Cast defaultValue to string in CreateEnumCommand
1 parent 2fc58ff commit 2854b6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Command/CreateEnumCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __invoke(InputInterface $input, OutputInterface $output): int
5959
$className .= ucfirst($attributes['elements'][0]);
6060
}
6161

62-
$defaultCase = $this->getCaseName($attributes['defaultValue'] ?? '');
62+
$defaultCase = $this->getCaseName((string) $attributes['defaultValue'] ?? '');
6363
foreach ($attributes['choices'] as $option) {
6464
$caseName = $this->getCaseName($option);
6565
$default = $caseName === $defaultCase ? ' // default' : '';

0 commit comments

Comments
 (0)