private function getUser(InputInterface $input, OutputInterface $output)
    {
        if ($user = $input->getOption('user')) {
            return $user;
        }
        if ($user = $this->getTransifexConfigValue('/user')) {
            $this->writelnVerbose($output, 'Using transifex user specified in config.');

            return $user;
        }
        if ($user = getenv('transifexuser')) {
            $this->writelnVerbose($output, 'Using transifex user specified in environment.');

            return $user;
        }
        if ($input->isInteractive()) {
            /** @var \Symfony\Component\Console\Helper\QuestionHelper $dialog */
            $dialog = $this->getHelperSet()->get('question');
            if ($user = $dialog->ask($input, $output, new Question('Transifex user:'))) {
                return $user;
            }
        }

        throw new \RuntimeException(
            'Error: you must either specify an username on the commandline or run interactive.'
        );
    }
private function getUser(InputInterface $input, OutputInterface $output)
    {
        if ($user = $input->getOption('user')) {
            return $user;
        }
        if ($user = $this->getTransifexConfigValue('/user')) {
            $this->writelnVerbose($output, 'Using transifex user specified in config.');

            return $user;
        }
        if ($user = getenv('transifexuser')) {
            $this->writelnVerbose($output, 'Using transifex user specified in environment.');

            return $user;
        }
        if ($input->isInteractive()) {
            /** @var \Symfony\Component\Console\Helper\QuestionHelper $dialog */
            $dialog = $this->getHelperSet()->get('question');
            if ($user = $dialog->ask($input, $output, new Question('Transifex user:'))) {
                return $user;
            }
        }

        throw new \RuntimeException(
            'Error: you must either specify an username on the commandline or run interactive.'
        );
    }
private function getUser ( InputInterface $ input , OutputInterface $ output ) { if ( $ user = $ input -> getOption ( 'user' ) ) { return $ user ; } if ( $ user = $ this -> getTransifexConfigValue ( '/user' ) ) { $ this -> writelnVerbose ( $ output , 'Using transifex user specified in config.' ) ; return $ user ; } if ( $ user = getenv ( 'transifexuser' ) ) { $ this -> writelnVerbose ( $ output , 'Using transifex user specified in environment.' ) ; return $ user ; } if ( $ input -> isInteractive ( ) ) { /** @var \Symfony\Component\Console\Helper\QuestionHelper $dialog */ $ dialog = $ this -> getHelperSet ( ) -> get ( 'question' ) ; if ( $ user = $ dialog -> ask ( $ input , $ output , new Question ( 'Transifex user:' ) ) ) { return $ user ; } } throw new \ RuntimeException ( 'Error: you must either specify an username on the commandline or run interactive.' ) ; }
Retrieve the user name.

@param InputInterface  $input  An InputInterface instance.

@param OutputInterface $output An OutputInterface instance.

@return string|null

@throws \RuntimeException If no username could be determined..
Retrieve the user name .