original_string: protected function buildSpress(IOInterface $io, InputInterface $input)
      {
          $timezone = $input->getOption('timezone');
          $drafts = $input->getOption('drafts');
          $safe = $input->getOption('safe');
          $env = $input->getOption('env');
          $sourceDir = $input->getOption('source');
  
          if (is_null($sourceDir) === true) {
              $sourceDir = './';
          }
  
          if (($realDir = realpath($sourceDir)) === false) {
              throw new \RuntimeException(sprintf('Invalid source path: "%s".', $sourceDir));
          }
  
          $spress = $this->getSpress($realDir);
  
          $spress['spress.config.env'] = $env;
          $spress['spress.config.safe'] = $safe;
          $spress['spress.config.drafts'] = $drafts;
          $spress['spress.config.timezone'] = $timezone;
  
          $resolver = $this->getConfigResolver();
          $resolver->resolve($spress['spress.config.values']);
  
          if ($spress['spress.config.values']['parsedown_activated'] === true) {
              $this->enableParsedown($spress);
  
  
              $io->labelValue('Parsedown converter', 'enabled');
          }
  
          $spress['spress.io'] = $io;
  
          return $spress;
      }
code: protected function buildSpress(IOInterface $io, InputInterface $input)
      {
          $timezone = $input->getOption('timezone');
          $drafts = $input->getOption('drafts');
          $safe = $input->getOption('safe');
          $env = $input->getOption('env');
          $sourceDir = $input->getOption('source');
  
          if (is_null($sourceDir) === true) {
              $sourceDir = './';
          }
  
          if (($realDir = realpath($sourceDir)) === false) {
              throw new \RuntimeException(sprintf('Invalid source path: "%s".', $sourceDir));
          }
  
          $spress = $this->getSpress($realDir);
  
          $spress['spress.config.env'] = $env;
          $spress['spress.config.safe'] = $safe;
          $spress['spress.config.drafts'] = $drafts;
          $spress['spress.config.timezone'] = $timezone;
  
          $resolver = $this->getConfigResolver();
          $resolver->resolve($spress['spress.config.values']);
  
          if ($spress['spress.config.values']['parsedown_activated'] === true) {
              $this->enableParsedown($spress);
  
  
              $io->labelValue('Parsedown converter', 'enabled');
          }
  
          $spress['spress.io'] = $io;
  
          return $spress;
      }
code_tokens: protected function buildSpress ( IOInterface $ io , InputInterface $ input ) { $ timezone = $ input -> getOption ( 'timezone' ) ; $ drafts = $ input -> getOption ( 'drafts' ) ; $ safe = $ input -> getOption ( 'safe' ) ; $ env = $ input -> getOption ( 'env' ) ; $ sourceDir = $ input -> getOption ( 'source' ) ; if ( is_null ( $ sourceDir ) === true ) { $ sourceDir = './' ; } if ( ( $ realDir = realpath ( $ sourceDir ) ) === false ) { throw new \ RuntimeException ( sprintf ( 'Invalid source path: "%s".' , $ sourceDir ) ) ; } $ spress = $ this -> getSpress ( $ realDir ) ; $ spress [ 'spress.config.env' ] = $ env ; $ spress [ 'spress.config.safe' ] = $ safe ; $ spress [ 'spress.config.drafts' ] = $ drafts ; $ spress [ 'spress.config.timezone' ] = $ timezone ; $ resolver = $ this -> getConfigResolver ( ) ; $ resolver -> resolve ( $ spress [ 'spress.config.values' ] ) ; if ( $ spress [ 'spress.config.values' ] [ 'parsedown_activated' ] === true ) { $ this -> enableParsedown ( $ spress ) ; $ io -> labelValue ( 'Parsedown converter' , 'enabled' ) ; } $ spress [ 'spress.io' ] = $ io ; return $ spress ; }
docstring: Builds a Spress instance.
  
  @param IOInterface    $io    The Spress IO
  @param InputInterface $input The Symfony Console input
  
  @return Spress The Spress instance
docstring_tokens: Builds a Spress instance .