| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function transformElementPayload( |
||
| 29 | ElementInterface $element, |
||
| 30 | Objects $field |
||
| 31 | ): array { |
||
| 32 | |||
| 33 | $transformer = HubSpot::getInstance()->getTransformers()->find( |
||
| 34 | TransformerHelper::eventName([$field->object, 'payload']), |
||
| 35 | get_class($element) |
||
| 36 | ); |
||
| 37 | |||
| 38 | if ($transformer !== null) { |
||
| 39 | return (array)Factory::item( |
||
| 40 | $transformer, |
||
| 41 | $element |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | |||
| 45 | return []; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |