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