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

ObjectCriteria::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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