Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | 5 | public function getTransactionsByMerchantId($merchantId) |
|
50 | { |
||
51 | 5 | if (!$this->getTransactionRepository() instanceof TransactionTable) { |
|
|
|||
52 | 2 | throw new TransactionRepositoryNotFoundException(); |
|
53 | } |
||
54 | |||
55 | 3 | return array_filter( |
|
56 | 3 | $this->getTransactionRepository()->getTransactions(), |
|
57 | 3 | function ($e) use ($merchantId) { |
|
58 | 3 | return (int)$e[0] === (int)$merchantId; |
|
59 | 3 | } |
|
62 | } |