Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 381c91a

Browse files
committed
Fix PHP deprecations and warnings
1 parent 97fcb7a commit 381c91a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Http/Resources/Json/ResourceCollection.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function withQuery(array $query)
8686
*
8787
* @return int
8888
*/
89-
public function count()
89+
public function count(): int
9090
{
9191
return $this->collection->count();
9292
}
@@ -96,7 +96,7 @@ public function count()
9696
*
9797
* @param \Illuminate\Http\Request $request
9898
*
99-
* @return array
99+
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
100100
*/
101101
public function toArray($request)
102102
{
@@ -112,7 +112,7 @@ public function toArray($request)
112112
*/
113113
public function toResponse($request)
114114
{
115-
if ($this->resource instanceof AbstractPaginator) {
115+
if ($this->resource instanceof AbstractPaginator || $this->resource instanceof AbstractCursorPaginator) {
116116
return $this->preparePaginatedResponse($request);
117117
}
118118

0 commit comments

Comments
 (0)