| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class GetCustomerEquipment extends GetCustomerDetails |
||
| 12 | { |
||
| 13 | 5 | public function execute($custID) |
|
| 14 | { |
||
| 15 | 5 | $equip = $this->getEquipment($custID); |
|
| 16 | |||
| 17 | // Get any equipment that is shared between sites |
||
| 18 | 5 | if($parent = $this->getParentID($custID)) |
|
| 19 | { |
||
| 20 | 2 | $equip = $equip->merge($this->getEquipment($parent, true)); |
|
| 21 | } |
||
| 22 | |||
| 23 | 5 | return $equip; |
|
| 24 | } |
||
| 25 | |||
| 26 | 5 | protected function getEquipment($custID, $shared = false) |
|
| 35 | } |
||
| 36 | } |
||
| 37 |