File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function execute(): int
38
38
$ exceedingScopes = $ this ->printResults ($ results );
39
39
40
40
// 閾値を超えるスコープがあればエラーコード2を返す
41
- if (!empty ($ exceedingScopes )) {
41
+ if (!empty ($ exceedingScopes[ ' scopes ' ] )) {
42
42
return 2 ;
43
43
}
44
44
@@ -48,7 +48,17 @@ public function execute(): int
48
48
49
49
/**
50
50
* @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
+ * } 閾値を超えたスコープの配列
52
62
*/
53
63
protected function printResults (array $ results ): array
54
64
{
@@ -86,6 +96,6 @@ protected function printResults(array $results): array
86
96
// 結果を表示
87
97
echo json_encode ($ report , JSON_PRETTY_PRINT ) . PHP_EOL ;
88
98
89
- return $ exceedingScopes ;
99
+ return $ report ;
90
100
}
91
101
}
You can’t perform that action at this time.
0 commit comments