Conditions | 2 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
36 | protected function execute(InputInterface $input, OutputInterface $output) |
||
37 | { |
||
38 | try { |
||
39 | $data = $this->getContainer()->get('ongr_currency_exchange.currency_rates_service'); |
||
40 | $data->reloadRates(); |
||
41 | $output->writeln(sprintf('<info>Currency rates updated</info>')); |
||
42 | } catch (ClientException $e) { |
||
43 | $output->writeln( |
||
44 | sprintf( |
||
45 | '<error>Error ocurred during update. </error> <comment>`%s`</comment>', |
||
46 | $e->getMessage() |
||
47 | ) |
||
48 | ); |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 |