Completed
Push — develop ( de31bd...3158f9 )
by Nate
20:35
created

ObjectFromElementMutator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 17
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPayload() 0 7 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/hubspot/license
6
 * @link       https://www.flipboxfactory.com/software/hubspot/
7
 */
8
9
namespace flipbox\hubspot\criteria\element;
10
11
use craft\errors\ElementNotFoundException;
12
use craft\errors\FieldNotFoundException;
13
use flipbox\hubspot\criteria\ObjectMutatorInterface;
14
use flipbox\hubspot\traits\TransformElementPayloadTrait;
15
16
/**
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 1.0.0
19
 */
20
class ObjectFromElementMutator extends ObjectFromElementAccessor implements ObjectMutatorInterface
21
{
22
    use TransformElementPayloadTrait;
23
24
    /**
25
     * @inheritdoc
26
     * @throws FieldNotFoundException
27
     * @throws ElementNotFoundException
28
     */
29
    public function getPayload(): array
30
    {
31
        return $this->transformElementPayload(
32
            $this->getElement(),
33
            $this->getField()
34
        );
35
    }
36
}
37