Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Resource/EmptyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,12 @@ public function htmlUrl() : string
{
return null;
}

/**
* @return User
*/
public function owner() : User
{
return null;
}
}
26 changes: 19 additions & 7 deletions src/Resource/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
namespace ApiClients\Client\Github\Resource;

use ApiClients\Foundation\Hydrator\Annotations\EmptyResource;
use ApiClients\Foundation\Hydrator\Annotations\Nested;
use ApiClients\Foundation\Resource\AbstractResource;
use DateTimeInterface;

/**
* @Nested(
* owner="User"
* )
* @EmptyResource("EmptyRepository")
*/
abstract class Repository extends AbstractResource implements RepositoryInterface
Expand Down Expand Up @@ -121,15 +125,20 @@ abstract class Repository extends AbstractResource implements RepositoryInterfac
*/
protected $updated_at;

/**
* @var array
*/
protected $permissions;

/**
* @var string
*/
protected $html_url;

/**
* @var array
* @var User
*/
//protected $permissions;
protected $owner;

/**
* @return int
Expand Down Expand Up @@ -315,16 +324,19 @@ public function permissions() : array
return $this->permissions;
}

public function labels()
{
return $this->labels;
}

/**
* @return string
*/
public function htmlUrl() : string
{
return $this->html_url;
}

/**
* @return User
*/
public function owner() : User
{
return $this->owner;
}
}
5 changes: 5 additions & 0 deletions src/Resource/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ public function permissions() : array;
* @return string
*/
public function htmlUrl() : string;

/**
* @return User
*/
public function owner() : User;
}
4 changes: 4 additions & 0 deletions yaml/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ properties:
updated_at: DateTimeInterface
permissions: array
html_url: string
owner:
type: User
annotations:
nested: User