Skip to content

Commit 042369f

Browse files
committed
fix: fix phpstan error.
1 parent ea44f34 commit 042369f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/Command/CheckCommand.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function execute(): int
3838
$exceedingScopes = $this->printResults($results);
3939

4040
// 閾値を超えるスコープがあればエラーコード2を返す
41-
if (!empty($exceedingScopes)) {
41+
if (!empty($exceedingScopes['scopes'])) {
4242
return 2;
4343
}
4444

@@ -48,7 +48,17 @@ public function execute(): int
4848

4949
/**
5050
* @param list<AnalysisResult> $results
51-
* @return array 閾値を超えたスコープの配列
51+
* @return array{
52+
* threshold: int,
53+
* result: string,
54+
* scopes: list<array{
55+
* file: string,
56+
* filename: string,
57+
* namespace: string|null,
58+
* name: string,
59+
* variableHardUsage: int
60+
* }>
61+
* } 閾値を超えたスコープの配列
5262
*/
5363
protected function printResults(array $results): array
5464
{
@@ -86,6 +96,6 @@ protected function printResults(array $results): array
8696
// 結果を表示
8797
echo json_encode($report, JSON_PRETTY_PRINT) . PHP_EOL;
8898

89-
return $exceedingScopes;
99+
return $report;
90100
}
91101
}

0 commit comments

Comments
 (0)