| Conditions | 4 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 23 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 24 | { |
||
| 25 | $fontsPath = $input->getOption('fonts-path') |
||
| 26 | ? realpath($input->getOption('fonts-path')) |
||
| 27 | : constant('BASE_PATH') . '/fonts' |
||
| 28 | ; |
||
| 29 | |||
| 30 | $output->writeln(sprintf('Fonts found in "%s":', $fontsPath)); |
||
| 31 | $factory = FontsFactory::create($fontsPath); |
||
| 32 | $fonts = $factory->getFonts(); |
||
| 33 | |||
| 34 | if (!count($fonts)) { |
||
| 35 | $output->writeln(' No fonts found'); |
||
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | foreach ($fonts as $name) { |
||
| 40 | $output->writeln(sprintf(' - %s', $name)); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |