$it = new \RecursiveIteratorIterator(
new \RecursiveCallbackFilterIterator(
new \RecursiveDirectoryIterator($projectDir),
- static function (\SplFileInfo $current, string $key, \RecursiveDirectoryIterator $it) {
+ static function (\SplFileInfo $current, string $key, \RecursiveDirectoryIterator $it): bool {
// Skip '.' and '..'.
if ($it->isDot()) {
return false;
}
)
);
- $readFiles = \array_map(static function (\SplFileInfo $f) {
+ $readFiles = \array_map(static function (\SplFileInfo $f): string {
return $f->getPathname();
}, \iterator_to_array($it));