Completed
Push — develop ( 1d947e...a9d8b7 )
by Nate
05:38
created

ContactListCriteria   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A read() 0 9 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\hubspot\HubSpot;
12
use flipbox\hubspot\services\resources\Companies;
13
use flipbox\hubspot\transformers\collections\DynamicTransformerCollection;
14
use flipbox\hubspot\transformers\DynamicModelSuccess;
15
use flipbox\hubspot\transformers\collections\TransformerCollectionInterface;
16
17
/**
18
 * @author Flipbox Factory <[email protected]>
19
 * @since 1.0.0
20
 */
21
class ContactListCriteria extends ResourceCriteria
22
{
23
    /**
24
     * @param array $config
25
     * @param null $source
26
     * @return mixed
27
     */
28
    public function read(array $config = [], $source = null)
29
    {
30
        $this->prepare($config);
31
32
        return HubSpot::getInstance()
33
            ->getResources()
34
            ->getContactLists()
35
            ->readByCriteria($this, $source);
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41
    public function fetch(array $config = [])
42
    {
43
        return $this->read($config);
44
    }
45
}
46