/** * Display rates. * * @param OutputStyle $outputStyle Console output style. * @return ConfigurationDebugCommand $this */ protected function displayRates(OutputStyle $outputStyle) { $outputStyle->section('Registered exchange rates:'); $headers = array('Currency code', 'Rate type', 'Source'); $rows = array(); /** * @var Configuration $rateConfiguration */ foreach ($this->ratesConfigurationRegistry as $rateConfiguration) { $rows[] = array($rateConfiguration->getCurrencyCode(), $rateConfiguration->getRateType(), $rateConfiguration->getSourceName()); } $outputStyle->table($headers, $rows); return $this; }