Skip to content

Commit cc0581d

Browse files
committed
chore: rename macro
1 parent c5d63c0 commit cc0581d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/MatchingMacro.php renamed to src/Laravel/CollectionMatchingMacro.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
declare(strict_types=1);
44

5-
namespace Maartenpaauw\Specifications;
5+
namespace Maartenpaauw\Specifications\Laravel;
66

77
use Closure;
88
use Illuminate\Support\Collection;
9+
use Maartenpaauw\Specifications\Specification;
910

1011
/**
1112
* @mixin Collection
1213
*/
13-
class MatchingMacro
14+
class CollectionMatchingMacro
1415
{
1516
public function __invoke(): Closure
1617
{

src/SpecificationsServiceProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Illuminate\Support\Collection;
88
use Maartenpaauw\Specifications\Commands\MakeSpecificationCommand;
9+
use Maartenpaauw\Specifications\Laravel\CollectionMatchingMacro;
910
use Spatie\LaravelPackageTools\Package;
1011
use Spatie\LaravelPackageTools\PackageServiceProvider;
1112

@@ -22,12 +23,12 @@ public function configurePackage(Package $package): void
2223

2324
public function packageRegistered(): void
2425
{
25-
/** @var string $name */
26-
$name = config('specification-pattern.collection-method', 'matching');
26+
/** @var string $method */
27+
$method = config('specification-pattern.collection-method', 'matching');
2728

2829
Collection::macro(
29-
$name,
30-
app(MatchingMacro::class)(),
30+
$method,
31+
app(CollectionMatchingMacro::class)(),
3132
);
3233
}
3334
}

0 commit comments

Comments
 (0)