protected function validateRepositories($index, $repo)
    {
        if (!\is_array($repo)) {
            throw new \UnexpectedValueException('Repository '.$index.' ('.json_encode($repo).') should be an array, '.\gettype($repo).' given');
        }
        if (!isset($repo['type'])) {
            throw new \UnexpectedValueException('Repository '.$index.' ('.json_encode($repo).') must have a type defined');
        }

        $this->validatePackageRepositories($index, $repo);
        $this->validateVcsRepositories($index, $repo);
    }
protected function validateRepositories($index, $repo)
    {
        if (!\is_array($repo)) {
            throw new \UnexpectedValueException('Repository '.$index.' ('.json_encode($repo).') should be an array, '.\gettype($repo).' given');
        }
        if (!isset($repo['type'])) {
            throw new \UnexpectedValueException('Repository '.$index.' ('.json_encode($repo).') must have a type defined');
        }

        $this->validatePackageRepositories($index, $repo);
        $this->validateVcsRepositories($index, $repo);
    }
protected function validateRepositories ( $ index , $ repo ) { if ( ! \ is_array ( $ repo ) ) { throw new \ UnexpectedValueException ( 'Repository ' . $ index . ' (' . json_encode ( $ repo ) . ') should be an array, ' . \ gettype ( $ repo ) . ' given' ) ; } if ( ! isset ( $ repo [ 'type' ] ) ) { throw new \ UnexpectedValueException ( 'Repository ' . $ index . ' (' . json_encode ( $ repo ) . ') must have a type defined' ) ; } $ this -> validatePackageRepositories ( $ index , $ repo ) ; $ this -> validateVcsRepositories ( $ index , $ repo ) ; }
Validates the config of repositories.

@param int|string  $index The index
@param array|mixed $repo  The config repo

@throws \UnexpectedValueException
Validates the config of repositories .