Completed
Push — master ( 117e7f...523c46 )
by Nate
02:56
created

GetById   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 35
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultSegments() 0 19 1
1
<?php
2
3
namespace Flipbox\Relay\HubSpot\Segment\ContactLists;
4
5
use Flipbox\Relay\HubSpot\Middleware\Client;
6
use Flipbox\Relay\HubSpot\Middleware\ContactLists\GetById as ContactListByIdMiddleware;
7
use Flipbox\Relay\Middleware\Stash as CacheMiddleware;
8
use Flipbox\Relay\Segments\AbstractSegment;
9
use Psr\Cache\CacheItemPoolInterface;
10
11
class GetById extends AbstractSegment
12
{
13
    /**
14
     * @var int
15
     */
16
    public $id;
17
18
    /**
19
     * @var CacheItemPoolInterface
20
     */
21
    public $cache;
22
23
    /**
24
     * @return array
25
     */
26
    protected function defaultSegments(): array
27
    {
28
        return [
29
            'uri' => [
30
                'class' => ContactListByIdMiddleware::class,
31
                'id' => $this->id,
32
                'logger' => $this->getLogger()
33
            ],
34
            'cache' => [
35
                'class' => CacheMiddleware::class,
36
                'pool' => $this->cache,
37
                'logger' => $this->getLogger()
38
            ],
39
            'client' => [
40
                'class' => Client::class,
41
                'logger' => $this->getLogger()
42
            ]
43
        ];
44
    }
45
}
46