Completed
Push — master ( 0c5dca...5c14c5 )
by Nate
02:48
created

UpdateByEmail::defaultSegments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 0
cts 15
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Flipbox\Relay\HubSpot\Segment\Contacts;
4
5
use Flipbox\Relay\HubSpot\Middleware\Contacts\UpdateByEmail as ContactUpdateByEmailMiddleware;
6
use Flipbox\Relay\HubSpot\Middleware\Client;
7
use Flipbox\Relay\Segments\AbstractSegment;
8
9
class UpdateByEmail extends AbstractSegment
10
{
11
    /**
12
     * @var string
13
     */
14
    public $email;
15
16
    /**
17
     * @var string
18
     */
19
    public $properties;
20
21
    /**
22
     * @return array
23
     */
24
    protected function defaultSegments(): array
25
    {
26
        return [
27
            'uri' => [
28
                'class' => ContactUpdateByEmailMiddleware::class,
29
                'email' => $this->email,
30
                'properties' => $this->properties,
31
                'logger' => $this->getLogger()
32
            ],
33
            'client' => [
34
                'class' => Client::class,
35
                'logger' => $this->getLogger()
36
            ]
37
        ];
38
    }
39
}
40