Skip to content

Commit 38095f9

Browse files
Update: Improved code quality.
1 parent fb931ba commit 38095f9

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/Facades/InfiniteScroll.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66

77
use Illuminate\Support\Facades\Facade;
88

9-
/**
10-
* @codeCoverageIgnore
11-
*/
129
final class InfiniteScroll extends Facade
1310
{
1411
/**
1512
* Get the registered name of the component.
16-
*
17-
* @return string
1813
*/
19-
protected static function getFacadeAccessor()
14+
protected static function getFacadeAccessor(): string
2015
{
2116
return 'infinite-scroll';
2217
}

src/InfiniteScroll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function make(string $key, Builder|CursorPaginator|Paginator $data, int $
2424
{
2525
if ($data instanceof Paginator) {
2626
return [
27-
$key => Inertia::defer(fn () => $data)->deepMerge(),
27+
$key => Inertia::defer(fn (): Paginator => $data)->deepMerge(),
2828
'type' => fn (): PaginationType => PaginationType::PAGED,
2929
'page' => fn () => $data->currentPage(),
3030
'hasMore' => fn () => $data->hasMorePages(),

tests/Unit/InfiniteScrollTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
expect($result['perPage']())->toBeInt();
7777
});
7878

79-
test('determines if pagination has more pages', function () {
79+
test('determines if pagination has more pages', function (): void {
8080
// Act
8181
$result = InfiniteScroll::make('test', TestModel::query()->paginate(perPage: 20));
8282

0 commit comments

Comments
 (0)