PHPPM\Commands\ConfigCommand::execute PHP Метод

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

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $config = $this->loadConfig($input, $output);
        $this->renderConfig($output, $config);
        $newContent = json_encode($config, JSON_PRETTY_PRINT);
        if (file_exists($this->file) && $newContent === file_get_contents($this->file)) {
            $output->writeln(sprintf('No changes to %s file.', realpath($this->file)));
            return;
        }
        file_put_contents($this->file, $newContent);
        $output->writeln(sprintf('<info>%s file written.</info>', realpath($this->file)));
    }