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
2 changes: 1 addition & 1 deletion app/Http/Resources/BaseResourceCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Pagination\LengthAwarePaginator;

/**
* @property LengthAwarePaginator<self> $resource
* @property LengthAwarePaginator<int, self> $resource
*/
class BaseResourceCollection extends ResourceCollection
{
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/BookRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
interface BookRepositoryInterface
{
/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*/
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator;

Expand Down
4 changes: 2 additions & 2 deletions app/Interfaces/PublisherRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
interface PublisherRepositoryInterface
{
/**
* @return LengthAwarePaginator<Publisher>
* @return LengthAwarePaginator<int, Publisher>
*/
public function getAllPublisher(): LengthAwarePaginator;

public function findPublisherById(int $id): ?Publisher;

/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*/
public function findBooksByPublisherId(
int $id,
Expand Down
2 changes: 1 addition & 1 deletion app/Repositories/BookRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class BookRepository implements BookRepositoryInterface
{
/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*/
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator
{
Expand Down
4 changes: 2 additions & 2 deletions app/Repositories/PublisherRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class PublisherRepository implements PublisherRepositoryInterface
{
/**
* @return LengthAwarePaginator<Publisher>
* @return LengthAwarePaginator<int, Publisher>
*/
public function getAllPublisher(int $perPage = 10, int $page = 1): LengthAwarePaginator
{
Expand All @@ -26,7 +26,7 @@ public function findPublisherById(int $id): ?Publisher
}

/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*
* @throws PublisherNotFoundException
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Services/BookService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
}

/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*/
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator
{
Expand Down
4 changes: 2 additions & 2 deletions app/Services/PublisherService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(
}

/**
* @return LengthAwarePaginator<Publisher>
* @return LengthAwarePaginator<int, Publisher>
*/
public function getAllPublisher(int $perPage = 10, int $page = 1): LengthAwarePaginator
{
Expand All @@ -41,7 +41,7 @@ public function findPublisherById(int $id): ?Publisher
}

/**
* @return LengthAwarePaginator<Book>
* @return LengthAwarePaginator<int, Book>
*/
public function findBooksByPublisherId(
int $publisherId,
Expand Down