| Conditions | 4 |
| Paths | 8 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 5 | ||
| Bugs | 0 | Features | 3 |
| 1 | <?php |
||
| 11 | 4 | protected function validate($transfer) |
|
| 12 | { |
||
| 13 | 4 | if (empty($transfer->getVentureOrderItemId())) { |
|
| 14 | 1 | $this->errors[] = 'Order item id can\'t be empty'; |
|
| 15 | 1 | } |
|
| 16 | |||
| 17 | 4 | if (empty($transfer->getPartnerCode())) { |
|
| 18 | 1 | $this->errors[] = 'Partner code can\'t be empty'; |
|
| 19 | 1 | } |
|
| 20 | |||
| 21 | 4 | if (empty($transfer->getVentureOrderNumber())) { |
|
| 22 | 1 | $this->errors[] = 'Venture order number can\'t be empty'; |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | 4 | return empty($this->errors); |
|
| 26 | } |
||
| 27 | } |
||
| 28 |