original_string: protected function questionClassInstance()
      {
          $classname = $this->questionClass();
  
          if (!class_exists($classname)) {
              throw new \Exception('Invalid question class.');
          }
  
          $instance = (new \ReflectionClass($classname))
              ->newInstanceArgs($this->questionClassArgs());
  
          if (!$instance instanceof \Symfony\Component\Console\Question\Question) {
              throw new \Exception('Invalid question class instance');
          }
  
          return $instance;
      }
code: protected function questionClassInstance()
      {
          $classname = $this->questionClass();
  
          if (!class_exists($classname)) {
              throw new \Exception('Invalid question class.');
          }
  
          $instance = (new \ReflectionClass($classname))
              ->newInstanceArgs($this->questionClassArgs());
  
          if (!$instance instanceof \Symfony\Component\Console\Question\Question) {
              throw new \Exception('Invalid question class instance');
          }
  
          return $instance;
      }
code_tokens: protected function questionClassInstance ( ) { $ classname = $ this -> questionClass ( ) ; if ( ! class_exists ( $ classname ) ) { throw new \ Exception ( 'Invalid question class.' ) ; } $ instance = ( new \ ReflectionClass ( $ classname ) ) -> newInstanceArgs ( $ this -> questionClassArgs ( ) ) ; if ( ! $ instance instanceof \ Symfony \ Component \ Console \ Question \ Question ) { throw new \ Exception ( 'Invalid question class instance' ) ; } return $ instance ; }
docstring: Question class instance.
  
  @return \Symfony\Component\Console\Question\Question
  An instantiated question class.
docstring_tokens: Question class instance .