File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments