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

UpdateByEmail   A

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultSegments() 0 15 1
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