protected function getDataFromConfigFile(OutputInterface $output): ?array
    {

        if ($this->findConfigFile($output) === null) {
            if ($output->isVerbose()) {
                $output->writeln('A configuration file `'.$this->getCommandStaticConfigFilename().'`'
                    . ' exists neither in the current directory nor in any parent directory');
            }
            return null;
        }


        if ($output->isVerbose()) {
            $output->writeln('Reading options from the `' . $this->findConfigFile($output) . '` configuration file');
        }

        try {
            $configData = Yaml\Yaml::parseFile($this->findConfigFile($output));
        } catch (Yaml\Exception\ParseException $exception) {
            throw new \RuntimeException('Couldn\'t parse the configuration file: '.$exception->getMessage());
        }

        return $configData;
    }
protected function getDataFromConfigFile(OutputInterface $output): ?array
    {

        if ($this->findConfigFile($output) === null) {
            if ($output->isVerbose()) {
                $output->writeln('A configuration file `'.$this->getCommandStaticConfigFilename().'`'
                    . ' exists neither in the current directory nor in any parent directory');
            }
            return null;
        }


        if ($output->isVerbose()) {
            $output->writeln('Reading options from the `' . $this->findConfigFile($output) . '` configuration file');
        }

        try {
            $configData = Yaml\Yaml::parseFile($this->findConfigFile($output));
        } catch (Yaml\Exception\ParseException $exception) {
            throw new \RuntimeException('Couldn\'t parse the configuration file: '.$exception->getMessage());
        }

        return $configData;
    }
protected function getDataFromConfigFile ( OutputInterface $ output ) : ? array { if ( $ this -> findConfigFile ( $ output ) === null ) { if ( $ output -> isVerbose ( ) ) { $ output -> writeln ( 'A configuration file `' . $ this -> getCommandStaticConfigFilename ( ) . '`' . ' exists neither in the current directory nor in any parent directory' ) ; } return null ; } if ( $ output -> isVerbose ( ) ) { $ output -> writeln ( 'Reading options from the `' . $ this -> findConfigFile ( $ output ) . '` configuration file' ) ; } try { $ configData = Yaml \ Yaml :: parseFile ( $ this -> findConfigFile ( $ output ) ) ; } catch ( Yaml \ Exception \ ParseException $ exception ) { throw new \ RuntimeException ( 'Couldn\'t parse the configuration file: ' . $ exception -> getMessage ( ) ) ; } return $ configData ; }
Gets options values from a configuration file

@param OutputInterface $output
@return array[]|null Options values; null means that a configuration file wasn't found. The keys are:
- gApiOAuthSecretFile (string|null)
- gApiAccessTokenFile (string|null)
@throws \RuntimeException If a configuration file can't be read or parsed
Gets options values from a configuration file