@@ -22,14 +22,18 @@ class BaselineSplitter
2222
2323 private bool $ includeCount ;
2424
25- public function __construct (string $ indent , bool $ includeCount )
25+ public function __construct (
26+ string $ indent ,
27+ bool $ includeCount
28+ )
2629 {
2730 $ this ->indent = $ indent ;
2831 $ this ->includeCount = $ includeCount ;
2932 }
3033
3134 /**
3235 * @return array<string, int|null>
36+ *
3337 * @throws ErrorException
3438 */
3539 public function split (string $ loaderFilePath ): array
@@ -66,7 +70,7 @@ public function split(string $loaderFilePath): array
6670 foreach ($ groupedErrors as $ identifier => $ errors ) {
6771 $ fileName = $ identifier . '. ' . $ extension ;
6872 $ filePath = $ folder . '/ ' . $ fileName ;
69- $ errorsCount = array_reduce ($ errors , static fn (int $ carry , array $ item ): int => $ carry + $ item ['count ' ], 0 );
73+ $ errorsCount = array_reduce ($ errors , static fn (int $ carry , array $ item ): int => $ carry + $ item ['count ' ], 0 );
7074 $ totalErrorCount += $ errorsCount ;
7175
7276 $ outputInfo [$ filePath ] = $ errorsCount ;
@@ -92,9 +96,13 @@ public function split(string $loaderFilePath): array
9296 /**
9397 * @param array<mixed> $errors
9498 * @return array<string, list<array{message: string, count: int, path: string}>>
99+ *
95100 * @throws ErrorException
96101 */
97- private function groupErrorsByIdentifier (array $ errors , string $ folder ): array
102+ private function groupErrorsByIdentifier (
103+ array $ errors ,
104+ string $ folder
105+ ): array
98106 {
99107 $ groupedErrors = [];
100108
@@ -147,7 +155,10 @@ private function groupErrorsByIdentifier(array $errors, string $folder): array
147155 /**
148156 * @throws ErrorException
149157 */
150- private function writeFile (string $ filePath , string $ contents ): void
158+ private function writeFile (
159+ string $ filePath ,
160+ string $ contents
161+ ): void
151162 {
152163 $ written = file_put_contents ($ filePath , $ contents );
153164
0 commit comments