Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
1 | <?php |
||
30 | 1 | public function findMatches($term) { |
|
31 | 1 | $recipientsFromContacts = $this->contactsIntegration->getMatchingRecipient($term); |
|
32 | 1 | $fromCollector = $this->addressCollector->searchAddress($term); |
|
33 | |||
34 | // Convert collected addresses into same format as CI creates |
||
35 | 1 | $recipientsFromCollector = array_map(function ($address) { |
|
36 | return [ |
||
37 | 1 | 'id' => $address->getId(), |
|
38 | 1 | 'label' => $address->getEmail(), |
|
39 | 1 | 'value' => $address->getEmail(), |
|
40 | 1 | ]; |
|
41 | 1 | }, $fromCollector); |
|
42 | |||
43 | 1 | return array_merge($recipientsFromContacts, $recipientsFromCollector); |
|
44 | } |
||
45 | |||
47 |