| Conditions | 5 |
| Paths | 7 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 2 | public function __construct(array $transactions, array $recipients) |
|
| 18 | { |
||
| 19 | 2 | foreach ($transactions as $t) { |
|
| 20 | 2 | if (!$t instanceof RawTransaction) { |
|
| 21 | 2 | throw new \InvalidArgumentException("Invalid type within RawTransaction array: " . gettype($t)); |
|
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | 2 | foreach ($recipients as $r) { |
|
| 26 | 2 | if (!$r instanceof Recipient) { |
|
| 27 | 2 | throw new \InvalidArgumentException("Invalid type within Recipient array: " . gettype($r)); |
|
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | 2 | $this->transactions = $transactions; |
|
| 32 | 2 | $this->recipients = $recipients; |
|
| 33 | 2 | } |
|
| 51 |