Skip to content

Commit ed81f3f

Browse files
committed
rename getDynamicSlug => getDynamicDefaultSlug
1 parent 428d3ab commit ed81f3f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
* build(deps): bump axios from 1.6.2 to 1.6.3 by @dependabot in https://github.com/bavix/laravel-wallet/pull/821
1313

1414
### Added
15-
* add wallet getDynamicSlug by @rez1dent3 in https://github.com/bavix/laravel-wallet/pull/822
15+
* add wallet getDynamicDefaultSlug by @rez1dent3 in https://github.com/bavix/laravel-wallet/pull/822
1616

1717
## [10.0.2] - 2023-12-14
1818
### Bump

src/Traits/MorphOneWallet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function wallet(): MorphOne
3535
->withDefault(static function (WalletModel $wallet, object $holder) use ($castService) {
3636
$model = $castService->getModel($holder);
3737

38-
$slug = method_exists($model, 'getDynamicSlug')
39-
? $model->getDynamicSlug()
38+
$slug = method_exists($model, 'getDynamicDefaultSlug')
39+
? $model->getDynamicDefaultSlug()
4040
: config('wallet.wallet.default.slug', 'default');
4141

4242
$wallet->forceFill(array_merge(config('wallet.wallet.creating', []), [

tests/Infra/Models/UserDynamic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getTable(): string
2828
return 'users';
2929
}
3030

31-
public function getDynamicSlug(): string
31+
public function getDynamicDefaultSlug(): string
3232
{
3333
return 'default-' . $this->email;
3434
}

tests/Units/Domain/WalletTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public function testDefaultWalletCustomize(): void
303303
self::assertSame(1, $wallet->meta['internal'] ?? 0);
304304
}
305305

306-
public function testGetDynamicSlug(): void
306+
public function testgetDynamicDefaultSlug(): void
307307
{
308308
/** @var UserDynamic $user */
309309
$user = UserDynamicFactory::new()->create();

0 commit comments

Comments
 (0)