| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | public function addElement(ElementInterface $element, Objects $field) |
||
| 63 | { |
||
| 64 | $objectId = HubSpot::getInstance()->getObjectAssociations()->findObjectIdByElement( |
||
| 65 | $element, |
||
| 66 | $field |
||
| 67 | ); |
||
| 68 | |||
| 69 | if ($objectId !== null) { |
||
| 70 | $this->vids[] = $objectId; |
||
| 71 | return; |
||
| 72 | } |
||
| 73 | |||
| 74 | if (null !== ($email = $element['email'] ?? null)) { |
||
| 75 | $this->emails[] = $email; |
||
| 76 | return; |
||
| 77 | } |
||
| 78 | } |
||
| 79 | } |
||
| 80 |