Skip to content

Commit

Permalink
remove before and after
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Feb 17, 2025
1 parent 43d6300 commit d3a4496
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 86 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ jobs:
matrix:
os: [ubuntu-latest]
php: [8.2]
laravel: ['10.*', '11.*', '12.*']
laravel: ['12.*']
dependency-version: [prefer-stable, prefer-lowest]
include:
- testbench: 8.*
laravel: 10.*
- testbench: 9.*
laravel: 11.*
- testbench: 10.*
laravel: 12.*

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ The package will automatically register itself.
- [`ninth`](#ninth)
- [`tenth`](#tenth)
- [`getNth`](#getNth)
- [`before`](#before)
- [`catch`](#catch)
- [`chunkBy`](#chunkby)
- [`collectBy`](#collectBy)
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
],
"require": {
"php": "^8.2",
"illuminate/support": "^10.0|^11.0|^12.0"
"illuminate/support": "^12.0"
},
"require-dev": {
"amphp/parallel": "^1.4.3|^2.2",
"amphp/parallel-functions": "^1.1.0|^2.0",
"amphp/parallel": "^2.2",
"amphp/parallel-functions": "^2.0",
"mockery/mockery": "^1.6.2",
"orchestra/testbench": "^8.5.9|^9.0|^10.0",
"pestphp/pest": "^2.0|^3.7",
"phpunit/phpunit": "10.2.2|^10.5|^11.5.3",
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.7",
"phpunit/phpunit": "^11.5.3",
"spatie/laravel-ray": "^1.32.5",
"symfony/stopwatch": "^6.3|^7.0"
},
Expand Down
2 changes: 0 additions & 2 deletions src/CollectionMacroServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ public function register()
private function macros(): array
{
return [
'after' => \Spatie\CollectionMacros\Macros\After::class,
'at' => \Spatie\CollectionMacros\Macros\At::class,
'before' => \Spatie\CollectionMacros\Macros\Before::class,
'chunkBy' => \Spatie\CollectionMacros\Macros\ChunkBy::class,
'collectBy' => \Spatie\CollectionMacros\Macros\CollectBy::class,
'containsAll' => \Spatie\CollectionMacros\Macros\ContainsAll::class,
Expand Down
37 changes: 0 additions & 37 deletions src/Macros/After.php

This file was deleted.

23 changes: 0 additions & 23 deletions src/Macros/Before.php

This file was deleted.

6 changes: 0 additions & 6 deletions tests/Macros/AfterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,3 @@

expect($data->after(3))->toBeNull();
});

it('can return a fallback value if there isnt a next item', function () {
$data = new Collection([1, 2, 3]);

expect($data->after(3, 4))->toEqual(4);
});
6 changes: 0 additions & 6 deletions tests/Macros/BeforeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,3 @@

expect($data->before(1))->toBeNull();
});

it('can return a fallback value if there isnt a previous item', function () {
$data = new Collection([1, 2, 3]);

expect($data->before(1, 'The void'))->toEqual('The void');
});

0 comments on commit d3a4496

Please sign in to comment.