| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class GetCustomerNotes extends GetCustomerDetails |
||
| 10 | { |
||
| 11 | // Get all notes belonging to a customer or shared notes belonging to its parent |
||
| 12 | 6 | public function execute($custID) |
|
| 13 | { |
||
| 14 | 6 | $notes = $this->getNotes($custID); |
|
| 15 | |||
| 16 | 6 | if($parent = $this->getParentID($custID)) |
|
| 17 | { |
||
| 18 | 2 | $notes = $notes->merge($this->getNotes($parent, true)); |
|
| 19 | } |
||
| 20 | |||
| 21 | 6 | Log::debug('Customer Notes for Customer ID'.$custID.' gathered. Data - ', $notes->toArray()); |
|
| 22 | 6 | return $notes; |
|
| 23 | } |
||
| 24 | |||
| 25 | // Get the details of a single note |
||
| 26 | public function getOneNote($noteID) |
||
| 31 | } |
||
| 32 | |||
| 33 | // Get the notes for the specified customer |
||
| 34 | 6 | protected function getNotes($custID, $shared = false) |
|
| 45 |