File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -32,25 +32,24 @@ public function decimalPlaces(Wallet $object): int
3232 */
3333 public function fee (Wallet $ wallet , int $ amount ): int
3434 {
35- $ result = 0 ;
36-
35+ $ fee = 0 ;
3736 if ($ wallet instanceof Taxable) {
38- $ result = (int ) ($ amount * $ wallet ->getFeePercent () / 100 );
37+ $ fee = (int ) ($ amount * $ wallet ->getFeePercent () / 100 );
38+ }
3939
40- /**
41- * Added minimum commission condition
42- *
43- * @see https://github.com/bavix/laravel-wallet/issues/64#issuecomment-514483143
44- */
45- if ($ wallet instanceof MinimalTaxable) {
46- $ minimal = $ wallet ->getMinimalFee ();
47- if ($ result < $ minimal ) {
48- $ result = $ wallet ->getMinimalFee ();
49- }
40+ /**
41+ * Added minimum commission condition
42+ *
43+ * @see https://github.com/bavix/laravel-wallet/issues/64#issuecomment-514483143
44+ */
45+ if ($ wallet instanceof MinimalTaxable) {
46+ $ minimal = $ wallet ->getMinimalFee ();
47+ if ($ fee < $ minimal ) {
48+ $ fee = $ wallet ->getMinimalFee ();
5049 }
5150 }
5251
53- return $ result ;
52+ return $ fee ;
5453 }
5554
5655 /**
You can’t perform that action at this time.
0 commit comments