protected function return_repo_type() {
		$arr         = [];
		$arr['type'] = $this->type->type;

		switch ( $this->type->git ) {
			case 'github':
				$arr['git']           = 'github';
				$arr['base_uri']      = 'https://api.github.com';
				$arr['base_download'] = 'https://github.com';
				break;
			case 'bitbucket':
				$arr['git'] = 'bitbucket';
				if ( empty( $this->type->enterprise ) ) {
					$arr['base_uri']      = 'https://api.bitbucket.org';
					$arr['base_download'] = 'https://bitbucket.org';
				} else {
					$arr['base_uri']      = $this->type->enterprise_api;
					$arr['base_download'] = $this->type->enterprise;
				}
				break;
			case 'gitlab':
				$arr['git']           = 'gitlab';
				$arr['base_uri']      = 'https://gitlab.com/api/v4';
				$arr['base_download'] = 'https://gitlab.com';
				break;
			case 'gitea':
				$arr['git']           = 'gitea';
				$arr['base_uri']      = $this->type->enterprise . '/api/v1';
				$arr['base_download'] = $this->type->enterprise;
				break;
		}

		return $arr;
	}
protected function return_repo_type() {
		$arr         = [];
		$arr['type'] = $this->type->type;

		switch ( $this->type->git ) {
			case 'github':
				$arr['git']           = 'github';
				$arr['base_uri']      = 'https://api.github.com';
				$arr['base_download'] = 'https://github.com';
				break;
			case 'bitbucket':
				$arr['git'] = 'bitbucket';
				if ( empty( $this->type->enterprise ) ) {
					$arr['base_uri']      = 'https://api.bitbucket.org';
					$arr['base_download'] = 'https://bitbucket.org';
				} else {
					$arr['base_uri']      = $this->type->enterprise_api;
					$arr['base_download'] = $this->type->enterprise;
				}
				break;
			case 'gitlab':
				$arr['git']           = 'gitlab';
				$arr['base_uri']      = 'https://gitlab.com/api/v4';
				$arr['base_download'] = 'https://gitlab.com';
				break;
			case 'gitea':
				$arr['git']           = 'gitea';
				$arr['base_uri']      = $this->type->enterprise . '/api/v1';
				$arr['base_download'] = $this->type->enterprise;
				break;
		}

		return $arr;
	}
protected function return_repo_type ( ) { $ arr = [ ] ; $ arr [ 'type' ] = $ this -> type -> type ; switch ( $ this -> type -> git ) { case 'github' : $ arr [ 'git' ] = 'github' ; $ arr [ 'base_uri' ] = 'https://api.github.com' ; $ arr [ 'base_download' ] = 'https://github.com' ; break ; case 'bitbucket' : $ arr [ 'git' ] = 'bitbucket' ; if ( empty ( $ this -> type -> enterprise ) ) { $ arr [ 'base_uri' ] = 'https://api.bitbucket.org' ; $ arr [ 'base_download' ] = 'https://bitbucket.org' ; } else { $ arr [ 'base_uri' ] = $ this -> type -> enterprise_api ; $ arr [ 'base_download' ] = $ this -> type -> enterprise ; } break ; case 'gitlab' : $ arr [ 'git' ] = 'gitlab' ; $ arr [ 'base_uri' ] = 'https://gitlab.com/api/v4' ; $ arr [ 'base_download' ] = 'https://gitlab.com' ; break ; case 'gitea' : $ arr [ 'git' ] = 'gitea' ; $ arr [ 'base_uri' ] = $ this -> type -> enterprise . '/api/v1' ; $ arr [ 'base_download' ] = $ this -> type -> enterprise ; break ; } return $ arr ; }
Return repo data for API calls.

@access protected

@return array
Return repo data for API calls .