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

GetAll::defaultSegments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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