protected function createConfiguration(array $options, $rootDir, InputInterface $input = null)
    {
        $configuration = new Configuration();
        $file = new Path();

        $repoToken = $options['repo_token'];
        $repoSecretToken = $options['repo_secret_token'];

        // handle coverage clover
        $coverage_clover = $options['coverage_clover'];
        if ($input !== null && $input->hasOption('coverage_clover')) {
            $option = $input->getOption('coverage_clover');
            if (!empty($option)) {
                $coverage_clover = $option;
            }
        }

        // handle output json path
        $json_path = $options['json_path'];
        if ($input !== null && $input->hasOption('json_path')) {
            $option = $input->getOption('json_path');
            if (!empty($option)) {
                $json_path = $option;
            }
        }

        return $configuration
            ->setRepoToken($repoToken !== null ? $repoToken : $repoSecretToken)
            ->setServiceName($options['service_name'])
            ->setRootDir($rootDir)
            ->setCloverXmlPaths($this->ensureCloverXmlPaths($coverage_clover, $rootDir, $file))
            ->setJsonPath($this->ensureJsonPath($json_path, $rootDir, $file))
            ->setExcludeNoStatements($options['exclude_no_stmt']);
    }
protected function createConfiguration(array $options, $rootDir, InputInterface $input = null)
    {
        $configuration = new Configuration();
        $file = new Path();

        $repoToken = $options['repo_token'];
        $repoSecretToken = $options['repo_secret_token'];

        // handle coverage clover
        $coverage_clover = $options['coverage_clover'];
        if ($input !== null && $input->hasOption('coverage_clover')) {
            $option = $input->getOption('coverage_clover');
            if (!empty($option)) {
                $coverage_clover = $option;
            }
        }

        // handle output json path
        $json_path = $options['json_path'];
        if ($input !== null && $input->hasOption('json_path')) {
            $option = $input->getOption('json_path');
            if (!empty($option)) {
                $json_path = $option;
            }
        }

        return $configuration
            ->setRepoToken($repoToken !== null ? $repoToken : $repoSecretToken)
            ->setServiceName($options['service_name'])
            ->setRootDir($rootDir)
            ->setCloverXmlPaths($this->ensureCloverXmlPaths($coverage_clover, $rootDir, $file))
            ->setJsonPath($this->ensureJsonPath($json_path, $rootDir, $file))
            ->setExcludeNoStatements($options['exclude_no_stmt']);
    }
protected function createConfiguration ( array $ options , $ rootDir , InputInterface $ input = null ) { $ configuration = new Configuration ( ) ; $ file = new Path ( ) ; $ repoToken = $ options [ 'repo_token' ] ; $ repoSecretToken = $ options [ 'repo_secret_token' ] ; // handle coverage clover $ coverage_clover = $ options [ 'coverage_clover' ] ; if ( $ input !== null && $ input -> hasOption ( 'coverage_clover' ) ) { $ option = $ input -> getOption ( 'coverage_clover' ) ; if ( ! empty ( $ option ) ) { $ coverage_clover = $ option ; } } // handle output json path $ json_path = $ options [ 'json_path' ] ; if ( $ input !== null && $ input -> hasOption ( 'json_path' ) ) { $ option = $ input -> getOption ( 'json_path' ) ; if ( ! empty ( $ option ) ) { $ json_path = $ option ; } } return $ configuration -> setRepoToken ( $ repoToken !== null ? $ repoToken : $ repoSecretToken ) -> setServiceName ( $ options [ 'service_name' ] ) -> setRootDir ( $ rootDir ) -> setCloverXmlPaths ( $ this -> ensureCloverXmlPaths ( $ coverage_clover , $ rootDir , $ file ) ) -> setJsonPath ( $ this -> ensureJsonPath ( $ json_path , $ rootDir , $ file ) ) -> setExcludeNoStatements ( $ options [ 'exclude_no_stmt' ] ) ; }
Create coveralls configuration.

@param array          $options    processed configuration
@param string         $rootDir    path to project root directory
@param InputInterface $input|null Input arguments

@return \PhpCoveralls\Bundle\CoverallsBundle\Config\Configuration
Create coveralls configuration .