Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
1 | <?php |
||
15 | 174 | public function __construct(array $transactions = []) |
|
16 | { |
||
17 | 174 | foreach ($transactions as $tx) { |
|
18 | 144 | if (!$tx instanceof TransactionInterface) { |
|
19 | 6 | throw new \InvalidArgumentException('Must provide TransactionInterface[] to TransactionCollection'); |
|
20 | } |
||
21 | 174 | } |
|
22 | |||
23 | 168 | $this->set = \SplFixedArray::fromArray($transactions); |
|
24 | 168 | } |
|
25 | |||
67 |