Skip to content

Commit b7df023

Browse files
committed
refactor: simplify guideline building from dir
1 parent 59383f8 commit b7df023

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Install/GuidelineComposer.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,7 @@ protected function guidelinesDir(string $dirPath): array
171171
return [];
172172
}
173173

174-
$guidelines = [];
175-
foreach ($finder as $file) {
176-
$guidelines[] = $this->guideline($file->getRealPath());
177-
}
178-
179-
return $guidelines;
174+
return array_map(fn ($file) => $this->guideline($file->getRealPath()), iterator_to_array($finder));
180175
}
181176

182177
/**

0 commit comments

Comments
 (0)