Completed
Push — master ( 0c0d2f...7c0457 )
by Nate
04:27
created

Batch   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
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 30
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\Contacts;
4
5
use Flipbox\Relay\HubSpot\Middleware\Contacts\Batch as ContactBatchMiddleware;
6
use Flipbox\Relay\HubSpot\Middleware\Client;
7
use Flipbox\Relay\HubSpot\Middleware\JsonRequest as JsonRequestMiddleware;
8
use Flipbox\Relay\Segments\AbstractSegment;
9
10
class Batch extends AbstractSegment
11
{
12
13
    /**
14
     * @var string
15
     */
16
    public $payload;
17
18
    /**
19
     * @return array
20
     */
21
    protected function defaultSegments(): array
22
    {
23
        return [
24
            'body' => [
25
                'class' => JsonRequestMiddleware::class,
26
                'payload' => $this->payload,
27
                'logger' => $this->getLogger()
28
            ],
29
            'uri' => [
30
                'class' => ContactBatchMiddleware::class,
31
                'logger' => $this->getLogger()
32
            ],
33
            'client' => [
34
                'class' => Client::class,
35
                'logger' => $this->getLogger()
36
            ]
37
        ];
38
    }
39
}
40