Status::request()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
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