N98\Magento\Command\Developer\Theme\DuplicatesCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $time = microtime(true);
        $this->detectMagento($output);
        if ($this->_magentoMajorVersion == self::MAGENTO_MAJOR_VERSION_2) {
            $output->writeln('<error>Magento 2 is currently not supported.</error>');
        } else {
            $referenceFiles = $this->getChecksums($this->_magentoRootFolder . '/app/design/frontend/' . $input->getArgument('originalTheme'));
            $themeFolder = $this->_magentoRootFolder . '/app/design/frontend/' . $input->getArgument('theme');
            $themeFiles = $this->getChecksums($themeFolder);
            $duplicates = array();
            foreach ($themeFiles as $themeFilename => $themeFileChecksum) {
                if (isset($referenceFiles[$themeFilename]) && $themeFileChecksum == $referenceFiles[$themeFilename]) {
                    $duplicates[] = $themeFolder . '/' . $themeFilename;
                }
            }
            if ($input->getOption('log-junit')) {
                $this->logJUnit($input, $duplicates, $input->getOption('log-junit'), microtime($time) - $time);
            } else {
                if (count($duplicates) === 0) {
                    $output->writeln('<info>No duplicates were found</info>');
                } else {
                    $output->writeln($duplicates);
                }
            }
        }
    }