diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b2e8d2..a30f70c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2, 8.3] + php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2, 8.3, 8.4] name: PHP ${{ matrix.php }} diff --git a/src/helpers.php b/src/helpers.php index 54723ed..21e3342 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -81,7 +81,7 @@ function array_except($array, $keys) * @param mixed $default * @return mixed */ - function array_first($array, callable $callback = null, $default = null) + function array_first($array, ?callable $callback = null, $default = null) { return Arr::first($array, $callback, $default); } @@ -153,7 +153,7 @@ function array_has($array, $keys) * @param mixed $default * @return mixed */ - function array_last($array, callable $callback = null, $default = null) + function array_last($array, ?callable $callback = null, $default = null) { return Arr::last($array, $callback, $default); }