File tree 9 files changed +30
-7
lines changed
9 files changed +30
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Bavix \Wallet \Exceptions ;
4
6
5
7
use InvalidArgumentException ;
6
8
7
- class AmountInvalid extends InvalidArgumentException
9
+ final class AmountInvalid extends InvalidArgumentException
8
10
{
9
11
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Bavix \Wallet \Exceptions ;
4
6
5
- class BalanceIsEmpty extends InsufficientFunds
7
+ final class BalanceIsEmpty extends InsufficientFunds
6
8
{
7
9
}
Original file line number Diff line number Diff line change 4
4
5
5
use InvalidArgumentException ;
6
6
7
- class ConfirmedInvalid extends InvalidArgumentException
7
+ final class ConfirmedInvalid extends InvalidArgumentException
8
8
{
9
9
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Bavix \Wallet \Exceptions ;
4
6
5
7
use LogicException ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Bavix \Wallet \Exceptions ;
4
6
5
7
use LogicException ;
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Bavix \Wallet \Exceptions ;
6
+
7
+ use InvalidArgumentException ;
8
+
9
+ final class UnconfirmedInvalid extends InvalidArgumentException
10
+ {
11
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Bavix \Wallet \Exceptions ;
4
6
5
7
use InvalidArgumentException ;
6
8
7
- class WalletOwnerInvalid extends InvalidArgumentException
9
+ final class WalletOwnerInvalid extends InvalidArgumentException
8
10
{
9
11
}
Original file line number Diff line number Diff line change 5
5
use Bavix \Wallet \Exceptions \BalanceIsEmpty ;
6
6
use Bavix \Wallet \Exceptions \ConfirmedInvalid ;
7
7
use Bavix \Wallet \Exceptions \InsufficientFunds ;
8
+ use Bavix \Wallet \Exceptions \UnconfirmedInvalid ;
8
9
use Bavix \Wallet \Exceptions \WalletOwnerInvalid ;
9
10
use Bavix \Wallet \Interfaces \Confirmable ;
10
11
use Bavix \Wallet \Interfaces \Mathable ;
@@ -59,7 +60,7 @@ public function safeConfirm(Transaction $transaction): bool
59
60
/**
60
61
* Removal of confirmation (forced), use at your own peril and risk.
61
62
*
62
- * @throws ConfirmedInvalid
63
+ * @throws UnconfirmedInvalid
63
64
*/
64
65
public function resetConfirm (Transaction $ transaction ): bool
65
66
{
@@ -74,7 +75,7 @@ public function resetConfirm(Transaction $transaction): bool
74
75
}
75
76
76
77
if (!$ transaction ->confirmed ) {
77
- throw new ConfirmedInvalid (trans ('wallet::errors.unconfirmed_invalid ' ));
78
+ throw new UnconfirmedInvalid (trans ('wallet::errors.unconfirmed_invalid ' ));
78
79
}
79
80
80
81
$ mathService = app (Mathable::class);
Original file line number Diff line number Diff line change 3
3
namespace Bavix \Wallet \Test ;
4
4
5
5
use Bavix \Wallet \Exceptions \ConfirmedInvalid ;
6
+ use Bavix \Wallet \Exceptions \UnconfirmedInvalid ;
6
7
use Bavix \Wallet \Exceptions \WalletOwnerInvalid ;
7
8
use Bavix \Wallet \Test \Factories \BuyerFactory ;
8
9
use Bavix \Wallet \Test \Factories \UserConfirmFactory ;
@@ -136,7 +137,7 @@ public function testConfirmedInvalid(): void
136
137
137
138
public function testUnconfirmedInvalid (): void
138
139
{
139
- $ this ->expectException (ConfirmedInvalid ::class);
140
+ $ this ->expectException (UnconfirmedInvalid ::class);
140
141
$ this ->expectExceptionMessageStrict (trans ('wallet::errors.unconfirmed_invalid ' ));
141
142
142
143
/** @var Buyer $buyer */
You can’t perform that action at this time.
0 commit comments