protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectMagento($output, true);
if (!$this->initMagento()) {
return;
}
$rewrites = array_merge($this->loadRewrites(), $this->loadAutoloaderRewrites());
$table = array();
foreach ($rewrites as $type => $data) {
if (count($data) > 0) {
foreach ($data as $class => $rewriteClass) {
$table[] = array($type, $class, implode(', ', $rewriteClass));
}
}
}
if (count($table) === 0 && $input->getOption('format') === null) {
$output->writeln('<info>No rewrites were found.</info>');
} else {
if (count($table) == 0) {
$table = array();
}
$this->getHelper('table')->setHeaders(array('Type', 'Class', 'Rewrite'))->setRows($table)->renderByFormat($output, $table, $input->getOption('format'));
}
}