Skip to content

Commit 7a40d4f

Browse files
committed
fix: fix phpstan error.
1 parent a2961ce commit 7a40d4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Option/CommandFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private function parseCheckCommand(): CommandInterface
110110
return new HelpCommand();
111111
}
112112

113-
$threshold = $parsedArgs->options['threshold'] ?? null;
113+
$threshold = isset($parsedArgs->options['threshold']) ? intval($parsedArgs->options['threshold']) : null;
114114

115115
return new CheckCommand($parsedArgs->paths, $threshold);
116116
}
@@ -191,7 +191,7 @@ private function isOption(string $arg): bool
191191
* オプション文字列をパースして名前と値を取得
192192
*
193193
* @param string $option オプション文字列
194-
* @return array{0: string, 1: mixed} [オプション名, オプション値]
194+
* @return array{0: string, 1: string|bool} [オプション名, オプション値]
195195
*/
196196
private function parseOption(string $option): array
197197
{
@@ -213,7 +213,7 @@ final class ParsedArguments
213213
{
214214
/**
215215
* @param array<string> $paths パスのリスト
216-
* @param array<string, mixed> $options オプションのマップ
216+
* @param array<string, string|int|bool|null> $options オプションのマップ
217217
*/
218218
public function __construct(
219219
public readonly array $paths,

0 commit comments

Comments
 (0)