src/Command/Check.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        Logger::getInstance($output)->info('Start Pahout command');

        Config::load($input->getOptions(), $input->getOption('config'));

        Logger::getInstance()->info('Start instruction');
        Logger::getInstance()->info('files: '.implode(',', $input->getArgument('files')));
        $pahout = new Pahout($input->getArgument('files'));
        $pahout->instruct();
        Logger::getInstance()->info('End instruction');

        Logger::getInstance()->info('Start formatter');
        $formatter = Formatter::create($output, $pahout->files, $pahout->hints);
        $formatter->print();
        Logger::getInstance()->info('End formatter');

        Logger::getInstance()->info('End Pahout command');

        if (count($pahout->hints) === 0) {
            return self::EXIT_CODE_HINT_NOT_FOUND;
        } else {
            return self::EXIT_CODE_HINT_FOUND;
        }
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        Logger::getInstance($output)->info('Start Pahout command');

        Config::load($input->getOptions(), $input->getOption('config'));

        Logger::getInstance()->info('Start instruction');
        Logger::getInstance()->info('files: '.implode(',', $input->getArgument('files')));
        $pahout = new Pahout($input->getArgument('files'));
        $pahout->instruct();
        Logger::getInstance()->info('End instruction');

        Logger::getInstance()->info('Start formatter');
        $formatter = Formatter::create($output, $pahout->files, $pahout->hints);
        $formatter->print();
        Logger::getInstance()->info('End formatter');

        Logger::getInstance()->info('End Pahout command');

        if (count($pahout->hints) === 0) {
            return self::EXIT_CODE_HINT_NOT_FOUND;
        } else {
            return self::EXIT_CODE_HINT_FOUND;
        }
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { Logger :: getInstance ( $ output ) -> info ( 'Start Pahout command' ) ; Config :: load ( $ input -> getOptions ( ) , $ input -> getOption ( 'config' ) ) ; Logger :: getInstance ( ) -> info ( 'Start instruction' ) ; Logger :: getInstance ( ) -> info ( 'files: ' . implode ( ',' , $ input -> getArgument ( 'files' ) ) ) ; $ pahout = new Pahout ( $ input -> getArgument ( 'files' ) ) ; $ pahout -> instruct ( ) ; Logger :: getInstance ( ) -> info ( 'End instruction' ) ; Logger :: getInstance ( ) -> info ( 'Start formatter' ) ; $ formatter = Formatter :: create ( $ output , $ pahout -> files , $ pahout -> hints ) ; $ formatter -> print ( ) ; Logger :: getInstance ( ) -> info ( 'End formatter' ) ; Logger :: getInstance ( ) -> info ( 'End Pahout command' ) ; if ( count ( $ pahout -> hints ) === 0 ) { return self :: EXIT_CODE_HINT_NOT_FOUND ; } else { return self :: EXIT_CODE_HINT_FOUND ; } }
CLI execution entrypoint

It is executed in the following steps.

1. Setup config.
2. Parse PHP scripts and traverse AST nodes.
3. Print hints.

@param InputInterface  $input  The input interface of symfony console.
@param OutputInterface $output The output interface of symfony console.
@return integer|null
CLI execution entrypoint