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