| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function performAction(Integrations $field, ElementInterface $element, IntegrationAssociation $record): bool |
||
| 41 | { |
||
| 42 | if (!$field instanceof ObjectsFieldInterface) { |
||
| 43 | $this->setMessage("Invalid field type."); |
||
| 44 | return false; |
||
| 45 | } |
||
| 46 | |||
| 47 | if (!$field->syncToHubSpot($element)) { |
||
| 48 | $this->setMessage("Failed to sync to HubSpot"); |
||
| 49 | return false; |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->setMessage("Sync to HubSpot executed successfully"); |
||
| 53 | return true; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |