Skip to content

Commit 1f4cbab

Browse files
authored
Merge pull request #12 from joelbladt/main
Update return type for LengthAwarePaginator
2 parents 206b3eb + 809dfd7 commit 1f4cbab

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

app/Http/Resources/BaseResourceCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Illuminate\Pagination\LengthAwarePaginator;
88

99
/**
10-
* @property LengthAwarePaginator<self> $resource
10+
* @property LengthAwarePaginator<int, self> $resource
1111
*/
1212
class BaseResourceCollection extends ResourceCollection
1313
{

app/Interfaces/BookRepositoryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
interface BookRepositoryInterface
1111
{
1212
/**
13-
* @return LengthAwarePaginator<Book>
13+
* @return LengthAwarePaginator<int, Book>
1414
*/
1515
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator;
1616

app/Interfaces/PublisherRepositoryInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
interface PublisherRepositoryInterface
1212
{
1313
/**
14-
* @return LengthAwarePaginator<Publisher>
14+
* @return LengthAwarePaginator<int, Publisher>
1515
*/
1616
public function getAllPublisher(): LengthAwarePaginator;
1717

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

2020
/**
21-
* @return LengthAwarePaginator<Book>
21+
* @return LengthAwarePaginator<int, Book>
2222
*/
2323
public function findBooksByPublisherId(
2424
int $id,

app/Repositories/BookRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class BookRepository implements BookRepositoryInterface
1313
{
1414
/**
15-
* @return LengthAwarePaginator<Book>
15+
* @return LengthAwarePaginator<int, Book>
1616
*/
1717
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator
1818
{

app/Repositories/PublisherRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class PublisherRepository implements PublisherRepositoryInterface
1414
{
1515
/**
16-
* @return LengthAwarePaginator<Publisher>
16+
* @return LengthAwarePaginator<int, Publisher>
1717
*/
1818
public function getAllPublisher(int $perPage = 10, int $page = 1): LengthAwarePaginator
1919
{
@@ -26,7 +26,7 @@ public function findPublisherById(int $id): ?Publisher
2626
}
2727

2828
/**
29-
* @return LengthAwarePaginator<Book>
29+
* @return LengthAwarePaginator<int, Book>
3030
*
3131
* @throws PublisherNotFoundException
3232
*/

app/Services/BookService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222
}
2323

2424
/**
25-
* @return LengthAwarePaginator<Book>
25+
* @return LengthAwarePaginator<int, Book>
2626
*/
2727
public function getAllBooks(int $perPage = 10, int $page = 1): LengthAwarePaginator
2828
{

app/Services/PublisherService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(
1919
}
2020

2121
/**
22-
* @return LengthAwarePaginator<Publisher>
22+
* @return LengthAwarePaginator<int, Publisher>
2323
*/
2424
public function getAllPublisher(int $perPage = 10, int $page = 1): LengthAwarePaginator
2525
{
@@ -41,7 +41,7 @@ public function findPublisherById(int $id): ?Publisher
4141
}
4242

4343
/**
44-
* @return LengthAwarePaginator<Book>
44+
* @return LengthAwarePaginator<int, Book>
4545
*/
4646
public function findBooksByPublisherId(
4747
int $publisherId,

0 commit comments

Comments
 (0)