Skip to content

Commit

Permalink
Use specific return types in value object providers
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Mar 14, 2023
1 parent c4b5bc4 commit 9019100
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(Repository $repository)
$this->repository = $repository;
}

public function getValueObject($value): ?object
public function getValueObject($value): ?Content
{
try {
/** @var \eZ\Publish\API\Repository\Values\Content\Content $content */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(Repository $repository)
$this->repository = $repository;
}

public function getValueObject($value): ?object
public function getValueObject($value): ?Location
{
try {
return $this->repository->sudo(
Expand Down
2 changes: 1 addition & 1 deletion lib/Parameters/ValueObjectProvider/ContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(Repository $repository)
$this->repository = $repository;
}

public function getValueObject($value): ?object
public function getValueObject($value): ?Content
{
try {
/** @var \eZ\Publish\API\Repository\Values\Content\Content $content */
Expand Down
2 changes: 1 addition & 1 deletion lib/Parameters/ValueObjectProvider/LocationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(Repository $repository)
$this->repository = $repository;
}

public function getValueObject($value): ?object
public function getValueObject($value): ?Location
{
try {
return $this->repository->sudo(
Expand Down

0 comments on commit 9019100

Please sign in to comment.