Skip to content

Commit

Permalink
fix: incorrect return type for find method on builder
Browse files Browse the repository at this point in the history
  • Loading branch information
kauffinger committed Oct 15, 2024
1 parent 17d2f81 commit 0b13dd8
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Query/ActivityBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Get,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/AddressBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Read,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public function once(OnOfficeRequest $request): Response
/**
* @throws OnOfficeException
*/
public function find(int $id): array
public function find(int $id): ?array
{
throw new OnOfficeException('Not implemented');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Concerns/BuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function get(): Collection;

public function first(): ?array;

public function find(int $id): array;
public function find(int $id): ?array;

public function each(callable $callback): void;

Expand Down
2 changes: 1 addition & 1 deletion src/Query/EstateBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Read,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/EstateFileBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Get,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/ImprintBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Read,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/SearchCriteriaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SearchCriteriaBuilder extends Builder
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int|array $id): array
public function find(int|array $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Get,
Expand Down
2 changes: 1 addition & 1 deletion src/Query/UserBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function first(): ?array
/**
* @throws Throwable<OnOfficeException>
*/
public function find(int $id): array
public function find(int $id): ?array
{
$request = new OnOfficeRequest(
OnOfficeAction::Get,
Expand Down

0 comments on commit 0b13dd8

Please sign in to comment.