Skip to content

Commit cda5d2e

Browse files
committed
Fix PHPStan errors in InitDtoCommand
1 parent 54be50c commit cda5d2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/InitDtoCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class InitDtoCommand extends Command
2222

2323
public function handle(): int
2424
{
25-
$format = strtolower($this->option('format'));
25+
$format = strtolower((string)$this->option('format'));
2626
$configPath = config('dto.config_path', config_path());
2727

2828
if (!in_array($format, ['php', 'xml', 'yaml', 'yml'], true)) {
@@ -67,7 +67,7 @@ private function getConfigContent(string $format): string
6767
return match ($format) {
6868
'php' => $this->getPhpConfig(),
6969
'xml' => $this->getXmlConfig(),
70-
'yaml' => $this->getYamlConfig(),
70+
default => $this->getYamlConfig(),
7171
};
7272
}
7373

0 commit comments

Comments
 (0)