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