files() ->in($this->getPackagePaths($includeFrameworkPackages)) ->exclude([ 'Classes', 'Tests', 'node_modules', 'vendor', ]) ->name('*.fluid.*'); return array_map( fn(SplFileInfo $file): string => $file->getPathname(), iterator_to_array($templates), ); } /** * @return string[] */ private function getPackagePaths(bool $includeFrameworkPackages): array { $activePackages = $this->packageManager->getActivePackages(); if (!$includeFrameworkPackages) { $activePackages = array_filter( $activePackages, fn(PackageInterface $package): bool => !$package->getPackageMetaData()->isFrameworkType(), ); } return array_map( fn(PackageInterface $package): string => $package->getPackagePath(), $activePackages, ); } }