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

GetAll   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
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 29
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultSegments() 0 18 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\GetAll as ContactListGetAllMiddleware;
7
use Flipbox\Relay\Middleware\Stash as CacheMiddleware;
8
use Flipbox\Relay\Segments\AbstractSegment;
9
use Psr\Cache\CacheItemPoolInterface;
10
11
class GetAll extends AbstractSegment
12
{
13
    /**
14
     * @var CacheItemPoolInterface
15
     */
16
    public $cache;
17
18
    /**
19
     * @return array
20
     */
21
    protected function defaultSegments(): array
22
    {
23
        return [
24
            'uri' => [
25
                'class' => ContactListGetAllMiddleware::class,
26
                'logger' => $this->getLogger()
27
            ],
28
            'cache' => [
29
                'class' => CacheMiddleware::class,
30
                'pool' => $this->cache,
31
                'logger' => $this->getLogger()
32
            ],
33
            'client' => [
34
                'class' => Client::class,
35
                'logger' => $this->getLogger()
36
            ]
37
        ];
38
    }
39
}
40