public function get_remote_api_branches( $git, $request ) {
		$branches = [];
		$response = isset( $this->response['branches'] ) ? $this->response['branches'] : false;

		if ( $this->exit_no_update( $response, true ) ) {
			return false;
		}

		if ( ! $response ) {
			self::$method = 'branches';
			$response     = $this->api( $request );
			$response     = $this->parse_response( $git, $response );

			if ( $this->validate_response( $response ) ) {
				return false;
			}

			if ( $response ) {
				$branches             = $this->parse_branch_response( $response );
				$this->type->branches = $branches;
				$this->set_repo_cache( 'branches', $branches );

				return true;
			}
		}

		$this->type->branches = $response;

		return true;
	}
public function get_remote_api_branches( $git, $request ) {
		$branches = [];
		$response = isset( $this->response['branches'] ) ? $this->response['branches'] : false;

		if ( $this->exit_no_update( $response, true ) ) {
			return false;
		}

		if ( ! $response ) {
			self::$method = 'branches';
			$response     = $this->api( $request );
			$response     = $this->parse_response( $git, $response );

			if ( $this->validate_response( $response ) ) {
				return false;
			}

			if ( $response ) {
				$branches             = $this->parse_branch_response( $response );
				$this->type->branches = $branches;
				$this->set_repo_cache( 'branches', $branches );

				return true;
			}
		}

		$this->type->branches = $response;

		return true;
	}
public function get_remote_api_branches ( $ git , $ request ) { $ branches = [ ] ; $ response = isset ( $ this -> response [ 'branches' ] ) ? $ this -> response [ 'branches' ] : false ; if ( $ this -> exit_no_update ( $ response , true ) ) { return false ; } if ( ! $ response ) { self :: $ method = 'branches' ; $ response = $ this -> api ( $ request ) ; $ response = $ this -> parse_response ( $ git , $ response ) ; if ( $ this -> validate_response ( $ response ) ) { return false ; } if ( $ response ) { $ branches = $ this -> parse_branch_response ( $ response ) ; $ this -> type -> branches = $ branches ; $ this -> set_repo_cache ( 'branches' , $ branches ) ; return true ; } } $ this -> type -> branches = $ response ; return true ; }
Create array of branches and download links as array.

@param string $git github|bitbucket|gitlab|gitea)
@param string $request API request.

@return bool
Create array of branches and download links as array .