public function get_remote_info($file)
{
$response = isset($this->response[$file]) ? $this->response[$file] : false;
if (!$response) {
$id = $this->get_gitlab_id();
self::$method = 'file';
if (empty($this->type->branch)) {
$this->type->branch = 'master';
}
$response = $this->api('/projects/' . $id . '/repository/files?file_path=' . $file);
if (empty($response) || !isset($response->content)) {
return false;
}
if ($response) {
$contents = base64_decode($response->content);
$response = $this->get_file_headers($contents, $this->type->type);
$this->set_transient($file, $response);
}
}
if ($this->validate_response($response) || !is_array($response)) {
return false;
}
$response['dot_org'] = $this->get_dot_org_data();
$this->set_file_info($response);
return true;
}