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

UpdateByDomain::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 10
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 3
crap 2
1
<?php
2
3
namespace Flipbox\Relay\HubSpot\Middleware\Companies;
4
5
use Psr\Http\Message\RequestInterface;
6
use Psr\Http\Message\ResponseInterface;
7
8
class UpdateByDomain extends AbstractCompany
9
{
10
    /**
11
     * @var string
12
     */
13
    public $domain;
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function __invoke(
19
        RequestInterface $request,
20
        ResponseInterface $response,
21
        callable $next = null
22
    ) {
23
        // Prepare request
24
        $request = $this->prepareUri(
25
            $request->withMethod('POST')
26
        );
27
28
        return $next($request, $response);
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    protected function getPath(): string
35
    {
36
        return "companies/domain/{$this->domain}";
37
    }
38
}
39