src/Formatter.php
public static function create(OutputInterface $output, array $files, array $hints): Base
    {
        switch (Config::getInstance()->format) {
            case 'pretty':
                return new Pretty($output, $files, $hints);
            case 'json':
                return new JSON($output, $files, $hints);
            default:
                return new Pretty($output, $files, $hints);
        }
    }
public static function create(OutputInterface $output, array $files, array $hints): Base
    {
        switch (Config::getInstance()->format) {
            case 'pretty':
                return new Pretty($output, $files, $hints);
            case 'json':
                return new JSON($output, $files, $hints);
            default:
                return new Pretty($output, $files, $hints);
        }
    }
public static function create ( OutputInterface $ output , array $ files , array $ hints ) : Base { switch ( Config :: getInstance ( ) -> format ) { case 'pretty' : return new Pretty ( $ output , $ files , $ hints ) ; case 'json' : return new JSON ( $ output , $ files , $ hints ) ; default : return new Pretty ( $ output , $ files , $ hints ) ; } }
Factory method that returns the specified formatter.

@param OutputInterface $output The output interface of symfony console.
@param string[]        $files  List of analyzed file names.
@param Hint[]          $hints  Hint list obtained as a result of analysis.
@return Base The specified formatter instance.
Factory method that returns the specified formatter .