From 6bee5c38796cf077a4385835c7aa7769e35fb065 Mon Sep 17 00:00:00 2001 From: mario Date: Tue, 26 Nov 2024 17:34:10 +0100 Subject: [PATCH] support for php 8.4 --- .github/workflows/run-tests.yml | 2 +- src/helpers.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9c3e970..8bfa3b4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.3, 8.2, 8.1] + php: [8.4, 8.3, 8.2, 8.1] laravel: ["^11.0", "^10.0", "^9.0", "^8.12"] dependency-version: [prefer-lowest, prefer-stable] include: diff --git a/src/helpers.php b/src/helpers.php index fe8a2b2..0d68157 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -10,7 +10,7 @@ * @param null $guard * @return bool */ - function can_impersonate(string $guard = null): bool + function can_impersonate(?string $guard = null): bool { $guard = $guard ?? app('impersonate')->getCurrentAuthGuardName(); @@ -28,7 +28,7 @@ function can_impersonate(string $guard = null): bool * @param string|null $guard * @return bool */ - function can_be_impersonated(Authenticatable $user, string $guard = null): bool + function can_be_impersonated(Authenticatable $user, ?string $guard = null): bool { $guard = $guard ?? app('impersonate')->getCurrentAuthGuardName(); return app('auth')->guard($guard)->check() @@ -45,7 +45,7 @@ function can_be_impersonated(Authenticatable $user, string $guard = null): bool * @param string|null $guard * @return bool */ - function is_impersonating(string $guard = null): bool + function is_impersonating(?string $guard = null): bool { $guard = $guard ?? app('impersonate')->getCurrentAuthGuardName();