Mmoreram\PHPFormatter\Command\UseSortCommand::execute PHP Метод

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

Execute command.
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface Input
$output Symfony\Component\Console\Output\OutputInterface Output
Результат integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $path = $input->getArgument('path');
        /**
         * We load the options to work with.
         */
        $options = $this->getUsableConfig($input);
        /**
         * Building the real directory or file to work in.
         */
        $filesystem = new Filesystem();
        if (!$filesystem->isAbsolutePath($path)) {
            $path = getcwd() . DIRECTORY_SEPARATOR . $path;
        }
        if (!is_file($path) && !is_dir($path)) {
            throw new Exception('Directory or file "' . $path . '" does not exist');
        }
        /*
         * Print dry-run message if needed
         */
        $this->printDryRunMessage($input, $output, $path);
        /*
         * Print all configuration block if verbose level allows it
         */
        $this->printConfigUsed($output, $options);
        $fileFinder = new FileFinder();
        $files = $fileFinder->findPHPFilesByPath($path);
        /*
         * Parse and fix all found files
         */
        $this->parseAndFixFiles($input, $output, $files, $options);
    }