Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | 3 | protected function execute(InputInterface $input, OutputInterface $output) |
|
49 | { |
||
50 | 3 | $files = $this->getContainer() |
|
51 | 3 | ->get('mauro_moreno_find.find_directory_service') |
|
52 | 3 | ->setPattern($input->getArgument('pattern')) |
|
53 | 3 | ->setDirectory($input->getArgument('directory')) |
|
54 | 3 | ->setExtension($input->getOption('extension')) |
|
55 | 3 | ->find(); |
|
56 | |||
57 | 3 | if ($files) { |
|
58 | 2 | foreach($files as $file) { |
|
59 | 2 | $output->writeln($file['filename']); |
|
60 | 2 | } |
|
61 | 2 | } else { |
|
62 | 1 | $output->writeln('No results where found.'); |
|
63 | } |
||
64 | 3 | } |
|
65 | |||
66 | } |