public static function fromComposer(IOInterface $io)
    {
        $input = new ArrayInput([]);
        $input->setInteractive($io->isInteractive());

        if ($io instanceof ConsoleIO) {
            $ref = new \ReflectionProperty($io, 'output');
            $ref->setAccessible(true);
            $output = $ref->getValue($io);
            if ($output instanceof ConsoleOutputInterface) {
                $output = $output->getErrorOutput();
            }
        } else {
            $output = new NullOutput();
        }

        return new static($input, $output);
    }
public static function fromComposer(IOInterface $io)
    {
        $input = new ArrayInput([]);
        $input->setInteractive($io->isInteractive());

        if ($io instanceof ConsoleIO) {
            $ref = new \ReflectionProperty($io, 'output');
            $ref->setAccessible(true);
            $output = $ref->getValue($io);
            if ($output instanceof ConsoleOutputInterface) {
                $output = $output->getErrorOutput();
            }
        } else {
            $output = new NullOutput();
        }

        return new static($input, $output);
    }
public static function fromComposer ( IOInterface $ io ) { $ input = new ArrayInput ( [ ] ) ; $ input -> setInteractive ( $ io -> isInteractive ( ) ) ; if ( $ io instanceof ConsoleIO ) { $ ref = new \ ReflectionProperty ( $ io , 'output' ) ; $ ref -> setAccessible ( true ) ; $ output = $ ref -> getValue ( $ io ) ; if ( $ output instanceof ConsoleOutputInterface ) { $ output = $ output -> getErrorOutput ( ) ; } } else { $ output = new NullOutput ( ) ; } return new static ( $ input , $ output ) ; }
Create from Composer IO.

@param IOInterface $io

@return NutStyle
Create from Composer IO .