Skip to content

Commit e4a7d93

Browse files
committed
update docs
1 parent 97f784e commit e4a7d93

File tree

9 files changed

+15
-20
lines changed

9 files changed

+15
-20
lines changed

docs/basic-usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Item extends Model implements ProductInterface
5656
{
5757
use HasWallet;
5858

59-
public function getAmountProduct(Customer $customer)
59+
public function getAmountProduct(Customer $customer): int|string
6060
{
6161
return 100;
6262
}
@@ -92,7 +92,7 @@ class Item extends Model implements ProductLimitedInterface
9292
return true;
9393
}
9494

95-
public function getAmountProduct(Customer $customer)
95+
public function getAmountProduct(Customer $customer): int|string
9696
{
9797
return 100;
9898
}

docs/cart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Item extends Model implements ProductInterface
3232
{
3333
use HasWallet;
3434

35-
public function getAmountProduct(Customer $customer)
35+
public function getAmountProduct(Customer $customer): int|string
3636
{
3737
return round($this->price * 100);
3838
}
@@ -68,7 +68,7 @@ class Item extends Model implements ProductLimitedInterface
6868
return true;
6969
}
7070

71-
public function getAmountProduct(Customer $customer)
71+
public function getAmountProduct(Customer $customer): int|string
7272
{
7373
return round($this->price * 100);
7474
}

docs/gift.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Item extends Model implements ProductInterface
3232
{
3333
use HasWallet;
3434

35-
public function getAmountProduct(Customer $customer)
35+
public function getAmountProduct(Customer $customer): int|string
3636
{
3737
return 100;
3838
}
@@ -68,7 +68,7 @@ class Item extends Model implements ProductLimitedInterface
6868
return true;
6969
}
7070

71-
public function getAmountProduct(Customer $customer)
71+
public function getAmountProduct(Customer $customer): int|string
7272
{
7373
return 100;
7474
}

docs/pay-free.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Item extends Model implements ProductInterface
3232
{
3333
use HasWallet;
3434

35-
public function getAmountProduct(Customer $customer)
35+
public function getAmountProduct(Customer $customer): int|string
3636
{
3737
return 100;
3838
}
@@ -68,7 +68,7 @@ class Item extends Model implements ProductLimitedInterface
6868
return true;
6969
}
7070

71-
public function getAmountProduct(Customer $customer)
71+
public function getAmountProduct(Customer $customer): int|string
7272
{
7373
return 100;
7474
}

docs/payment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Item extends Model implements ProductInterface
3232
{
3333
use HasWallet;
3434

35-
public function getAmountProduct(Customer $customer)
35+
public function getAmountProduct(Customer $customer): int|string
3636
{
3737
return 100;
3838
}
@@ -68,7 +68,7 @@ class Item extends Model implements ProductLimitedInterface
6868
return true;
6969
}
7070

71-
public function getAmountProduct(Customer $customer)
71+
public function getAmountProduct(Customer $customer): int|string
7272
{
7373
return 100;
7474
}

docs/refund.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Item extends Model implements ProductInterface
3232
{
3333
use HasWallet;
3434

35-
public function getAmountProduct(Customer $customer)
35+
public function getAmountProduct(Customer $customer): int|string
3636
{
3737
return 100;
3838
}
@@ -68,7 +68,7 @@ class Item extends Model implements ProductLimitedInterface
6868
return true;
6969
}
7070

71-
public function getAmountProduct(Customer $customer)
71+
public function getAmountProduct(Customer $customer): int|string
7272
{
7373
return 100;
7474
}

docs/taxing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Item extends Model implements ProductLimitedInterface, Taxable
3737
return true;
3838
}
3939

40-
public function getAmountProduct(Customer $customer)
40+
public function getAmountProduct(Customer $customer): int|string
4141
{
4242
return 100;
4343
}
@@ -94,7 +94,7 @@ class Item extends Model implements ProductInterface, MinimalTaxable
9494
{
9595
use HasWallet;
9696

97-
public function getAmountProduct(Customer $customer)
97+
public function getAmountProduct(Customer $customer): int|string
9898
{
9999
return 100;
100100
}

docs/upgrade-guide.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,3 @@ The product has been divided into two interfaces:
248248
The old Product interface should be replaced with one of these.
249249

250250
Replace `Bavix\Wallet\Interfaces\Product` to `Bavix\Wallet\Interfaces\ProductLimitedInterface`.
251-
252-
253-
---
254-
255-

tests/Infra/Models/ItemDiscount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getTable(): string
1717

1818
public function getPersonalDiscount(Customer $customer): int
1919
{
20-
return app(CastService::class)
20+
return (int) app(CastService::class)
2121
->getWallet($customer)
2222
->holder_id;
2323
}

0 commit comments

Comments
 (0)