mirror of
https://github.com/sitelease/sugar-cube-client.git
synced 2025-10-31 20:12:29 +01:00
Fixed the JSON serialization of the Repository class
This commit is contained in:
@ -367,26 +367,26 @@ class Repository implements \JsonSerializable {
|
||||
return (object) [
|
||||
'clone_url' => ($url = $this->getCloneUrl()) ? (string) $url : null,
|
||||
'created_at' => ($date = $this->getCreatedAt()) ? $date->format('c') : null,
|
||||
'default_branch' => 'defaultBranch',
|
||||
'description',
|
||||
'empty' => 'isEmpty',
|
||||
'fork' => 'isFork',
|
||||
'forks_count' => 'forksCount',
|
||||
'full_name' => 'fullName',
|
||||
'default_branch' => $this->getDefaultBranch(),
|
||||
'description' => $this->getDescription(),
|
||||
'empty' => $this->isEmpty(),
|
||||
'fork' => $this->isFork(),
|
||||
'forks_count' => $this->getForksCount(),
|
||||
'full_name' => $this->getFullName(),
|
||||
'html_url' => ($url = $this->getHtmlUrl()) ? (string) $url : null,
|
||||
'id',
|
||||
'mirror' => 'isMirror',
|
||||
'name',
|
||||
'open_issues_count' => 'openIssuesCount',
|
||||
'owner',
|
||||
'parent',
|
||||
'permissions',
|
||||
'private' => 'isPrivate',
|
||||
'size',
|
||||
'id' => $this->getId(),
|
||||
'mirror' => $this->isMirror(),
|
||||
'name' => $this->getName(),
|
||||
'open_issues_count' => $this->getOpenIssuesCount(),
|
||||
'owner' => ($user = $this->getOwner()) ? $user->jsonSerialize() : null,
|
||||
'parent' => ($repository = $this->getParent()) ? $repository->jsonSerialize() : null,
|
||||
'permissions' => ($perms = $this->getPermissions()) ? $perms->jsonSerialize() : null,
|
||||
'private' => $this->isPrivate(),
|
||||
'size' => $this->getSize(),
|
||||
'ssh_url' => ($url = $this->getSshUrl()) ? (string) $url : null,
|
||||
'stars_count' => 'starsCount',
|
||||
'stars_count' => $this->getStarsCount(),
|
||||
'updated_at' => ($date = $this->getUpdatedAt()) ? $date->format('c') : null,
|
||||
'watchers_count' => 'watchersCount',
|
||||
'watchers_count' => $this->getWatchersCount(),
|
||||
'website' => ($url = $this->getWebsite()) ? (string) $url : null,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user