Completed
Push — master ( bb722b...3bdf28 )
by Nate
02:16
created

TimelineEventAccessor::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipbox/hubspot/blob/master/LICENSE.md
6
 * @link       https://github.com/flipbox/hubspot
7
 */
8
9
namespace Flipbox\HubSpot\Criteria;
10
11
use Flipbox\HubSpot\Resources\TimelineEvent;
12
use Psr\Http\Message\ResponseInterface;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 2.0.0
17
 */
18
class TimelineEventAccessor extends AbstractCriteria
19
{
20
    use IdAttributeTrait,
21
        TypeIdAttributeTrait,
22
        IntegrationConnectionTrait,
23
        CacheTrait;
24
25
    /**
26
     * @param array $criteria
27
     * @param array $config
28
     * @return ResponseInterface
29
     * @throws \Exception
30
     */
31
    public function read(array $criteria = [], array $config = []): ResponseInterface
32
    {
33
        $this->populate($criteria);
34
35
        return TimelineEvent::read(
36
            $this->getId(),
37
            $this->getTypeId(),
38
            $this->getConnection(),
39
            $this->getCache(),
40
            $this->getLogger(),
41
            $config
42
        );
43
    }
44
}
45