Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Feb 2, 2024
1 parent a12b297 commit fae7613
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,21 @@
"ramsey/uuid": "^4.0"
},
"require-dev": {
"brianium/paratest": "^7.3",
"brianium/paratest": "^7.4",
"ergebnis/phpstan-rules": "^2.1",
"infection/infection": "~0.27",
"laravel/cashier": "^15.0",
"nunomaduro/collision": "^8.0",
"nunomaduro/larastan": "^2.7",
"larastan/larastan": "^2.8",
"orchestra/testbench": "^9.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"rector/rector": "^0.19",
"symplify/easy-coding-standard": "^12.0"
"symplify/easy-coding-standard": "^12.1"
},
"suggest": {
"bavix/laravel-wallet-swap": "Addition to the laravel-wallet library for quick setting of exchange rates",
"bavix/laravel-wallet-uuid": "Addition to the laravel-wallet library uuid support in laravel-wallet",
"bavix/laravel-wallet-warmup": "Addition to the laravel-wallet library for refresh balance wallets"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.common.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- vendor/nunomaduro/larastan/extension.neon
- vendor/larastan/larastan/extension.neon
- vendor/ergebnis/phpstan-rules/rules.neon

parameters:
Expand Down
6 changes: 5 additions & 1 deletion tests/Units/Domain/TransactionsFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function testPagination(): void

$query = Transaction::with('wallet')
->where('payable_id', $buyer->getKey())
->where('wallet_id', '=', $buyer->wallet->getKey())
->orderBy('created_at', 'desc')
;

Expand Down Expand Up @@ -154,7 +155,10 @@ public function testPagination2(): void

$query = Transaction::query()
->where(function ($query) use ($buyer, $walletTableName, $transactionTableName) {
$query->where('payable_id', '=', $buyer->getKey())
$query
->where('payable_type', '=', $buyer->getMorphClass())
->where('payable_id', '=', $buyer->getKey())
->where('wallet_id', '=', $buyer->wallet->getKey())
->join($walletTableName, $transactionTableName . '.wallet_id', '=', $walletTableName . '.id')
->select($transactionTableName . '.*', $walletTableName . '.name')
->get()
Expand Down

0 comments on commit fae7613

Please sign in to comment.