Skip to content

Commit

Permalink
Merge pull request #2 from Chris53897/feature/new
Browse files Browse the repository at this point in the history
feat: add Tests for PHP 8.4, fix deprecations for PHP 8.4
  • Loading branch information
cerbero90 authored Nov 22, 2024
2 parents 507fa27 + 88675b4 commit 84544f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
php: [8.1, 8.2, 8.3, 8.4]
dependency-version: [prefer-stable]
os: [ubuntu-latest]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions src/CasesCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function toArray(): array
* @param (callable(TValue, array-key): bool)|null $callback
* @return ?TValue
*/
public function first(callable $callback = null): mixed
public function first(callable|null $callback = null): mixed
{
$callback ??= fn() => true;

Expand Down Expand Up @@ -159,7 +159,7 @@ public function values(): array
* @param (callable(TValue): array-key)|string|null $key
* @return array<array-key, TPluckValue>
*/
public function pluck(callable|string $value, callable|string $key = null): array
public function pluck(callable|string $value, callable|string|null $key = null): array
{
$result = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/CollectsCases.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function count(): int
*
* @param (callable(self, array-key): bool)|null $callback
*/
public static function first(callable $callback = null): ?self
public static function first(callable|null $callback = null): ?self
{
return self::collect()->first($callback);
}
Expand Down Expand Up @@ -66,7 +66,7 @@ public static function values(): array
* @param (callable(self): array-key)|string|null $key
* @return array<array-key, TPluckValue>
*/
public static function pluck(callable|string $value, callable|string $key = null): array
public static function pluck(callable|string $value, callable|string|null $key = null): array
{
return self::collect()->pluck($value, $key);
}
Expand Down

0 comments on commit 84544f7

Please sign in to comment.