Completed
Push — develop ( caa666...8d2465 )
by Nate
28:00
created

ObjectCriteria   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 5
dl 0
loc 69
ccs 0
cts 29
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setId() 0 5 1
A getPayload() 0 4 1
A setPayload() 0 5 1
A prepare() 0 7 1
A fetch() 0 4 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;
10
11
use flipbox\ember\helpers\ObjectHelper;
12
use yii\base\BaseObject;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 1.0.0
17
 */
18
class ObjectCriteria extends BaseObject implements ObjectCriteriaInterface
19
{
20
    use traits\TransformerCollectionTrait,
21
        traits\ConnectionTrait,
22
        traits\CacheTrait;
23
24
    /**
25
     * @var string
26
     */
27
    public $id = '';
28
29
    /**
30
     * @var mixed
31
     */
32
    public $payload = '';
33
34
    /**
35
     * @return mixed
36
     */
37
    public function getId()
38
    {
39
        return $this->id;
40
    }
41
42
    /**
43
     * @inheritdoc
44
     */
45
    public function setId(string $id)
46
    {
47
        $this->id = $id;
48
        return $this;
49
    }
50
51
    /**
52
     * @return mixed
53
     */
54
    public function getPayload()
55
    {
56
        return $this->payload;
57
    }
58
59
    /**
60
     * @inheritdoc
61
     */
62
    public function setPayload(array $payload)
63
    {
64
        $this->payload = $payload;
65
        return $this;
66
    }
67
68
    /**
69
     * @inheritdoc
70
     */
71
    protected function prepare(array $criteria = [])
72
    {
73
        ObjectHelper::populate(
74
            $this,
75
            $criteria
76
        );
77
    }
78
79
    /**
80
     * @inheritdoc
81
     */
82
    public function fetch(array $config = [])
83
    {
84
        return null;
85
    }
86
}
87