Fragen\GitHub_Updater\Bitbucket_API::get_remote_branches PHP Метод

get_remote_branches() публичный Метод

Create array of branches and download links as array.
public get_remote_branches ( ) : boolean
Результат boolean
    public function get_remote_branches()
    {
        $branches = array();
        $response = isset($this->response['branches']) ? $this->response['branches'] : false;
        if ($this->exit_no_update($response, true)) {
            return false;
        }
        if (!$response) {
            $response = $this->api('/1.0/repositories/:owner/:repo/branches');
            if ($response) {
                foreach ($response as $branch => $api_response) {
                    $branches[$branch] = $this->construct_download_link(false, $branch);
                }
                $this->type->branches = $branches;
                $this->set_transient('branches', $branches);
                return true;
            }
        }
        if ($this->validate_response($response)) {
            return false;
        }
        $this->type->branches = $response;
        return true;
    }