Skip to content

Commit

Permalink
Fix implicitly nullable parameters for PHP 8.4 (#35)
Browse files Browse the repository at this point in the history
* Fix implicitly nullable parameters for PHP 8.4

* Add 8.4 to test matrix
  • Loading branch information
tylersatre authored Nov 26, 2024
1 parent 2df3a6d commit f289070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f289070

Please sign in to comment.