Test Failed
Branch main (0ffd95)
by
unknown
01:57
created

Status   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A request() 0 8 1
1
<?php
2
3
namespace ElasticEmail\Email;
4
5
use ElasticEmail\Client;
6
use ElasticEmail\Response;
7
8
class Status extends Response
9
{
10
    const URI = 'email/status';
11
12
    /** @var Client */
13
    private $client;
14
15
    public function __construct(Client $client)
16
    {
17
        $this->client = $client;
18
    }
19
20
    public function request(string $messageID)
21
    {
22
        $options = ['query' => ['messageID' => $messageID]];
23
24
        $this->response = $this->client->request('POST', self::URI, $options);
25
26
        return $this;
27
    }
28
}
29