Skip to content

Commit 0044c2b

Browse files
committed
fix ci
1 parent b51a727 commit 0044c2b

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/Http/Controllers/Api/V1/HealthController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __invoke(): JsonResponse
1414
{
1515
$checks = [
1616
'database' => $this->check(fn () => DB::connection()->select('SELECT 1')),
17-
'cache' => $this->check(function () {
17+
'cache' => $this->check(function (): void {
1818
$key = 'health:ping:' . bin2hex(random_bytes(4));
1919
Cache::put($key, '1', 5);
2020
if (Cache::get($key) !== '1') {
@@ -33,6 +33,9 @@ public function __invoke(): JsonResponse
3333
], $httpStatus);
3434
}
3535

36+
/**
37+
* @return array{ok: bool, error?: string}
38+
*/
3639
private function check(callable $probe): array
3740
{
3841
try {

app/Providers/RestifyServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ class RestifyServiceProvider extends RestifyApplicationServiceProvider
1313
{
1414
protected function gate(): void
1515
{
16-
Gate::define('viewRestify', function ($user = null) {
17-
return true;
18-
});
16+
Gate::define('viewRestify', fn($user = null) => true);
1917
}
2018

2119
protected function routes(): void

0 commit comments

Comments
 (0)