src/TravisDeployer.php
private function getConfig()
    {
        $yaml = new Parser();

        $configFile = getenv('TRAVIS_BUILD_DIR') . '/.travis.yml';

        $config = $yaml->parse(file_get_contents($configFile));
        $config = $config['travisdeployer'];

        $this->branches = $config['branches'];
        if (count($this->branches) === 0) {
            die('No branches are configured to deploy to.' . PHP_EOL);
        }

        $this->verbose = filter_input(FILTER_VALIDATE_BOOLEAN, $config['verbose']);
    }
private function getConfig()
    {
        $yaml = new Parser();

        $configFile = getenv('TRAVIS_BUILD_DIR') . '/.travis.yml';

        $config = $yaml->parse(file_get_contents($configFile));
        $config = $config['travisdeployer'];

        $this->branches = $config['branches'];
        if (count($this->branches) === 0) {
            die('No branches are configured to deploy to.' . PHP_EOL);
        }

        $this->verbose = filter_input(FILTER_VALIDATE_BOOLEAN, $config['verbose']);
    }
private function getConfig ( ) { $ yaml = new Parser ( ) ; $ configFile = getenv ( 'TRAVIS_BUILD_DIR' ) . '/.travis.yml' ; $ config = $ yaml -> parse ( file_get_contents ( $ configFile ) ) ; $ config = $ config [ 'travisdeployer' ] ; $ this -> branches = $ config [ 'branches' ] ; if ( count ( $ this -> branches ) === 0 ) { die ( 'No branches are configured to deploy to.' . PHP_EOL ) ; } $ this -> verbose = filter_input ( FILTER_VALIDATE_BOOLEAN , $ config [ 'verbose' ] ) ; }
Parse the config and place them into protected variables
Parse the config and place them into protected variables