Chris@0: 0) { Chris@0: // Multiple hooks can be dumped to the same file. Chris@0: $dumped_files = array_unique($dumped_files); Chris@0: Chris@0: usort($dumped_files, function ($a, $b) { Chris@0: $depth_a = substr_count($a, '/'); Chris@0: $depth_b = substr_count($b, '/'); Chris@0: // Top level files should be printed first. Chris@0: return $depth_a == $depth_b || ($depth_a > 1 && $depth_b > 1) ? Chris@0: strcmp($a, $b) : ($depth_a > $depth_b ? 1 : -1); Chris@0: }); Chris@0: Chris@0: $output->writeln(''); Chris@0: $output->writeln(' The following directories and files have been created or updated:'); Chris@0: $output->writeln('–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––'); Chris@0: foreach ($dumped_files as $file) { Chris@0: $output->writeln(" • $file"); Chris@0: } Chris@0: $output->writeln(''); Chris@0: } Chris@0: Chris@0: } Chris@0: Chris@0: }