BatchOperation::setMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AlexCk\MailchimpBundle\Model\MailChimp;
6
7
class BatchOperation implements \JsonSerializable
8
{
9
    /**
10
     * @var string
11
     */
12
    private $method;
13
14
    /**
15
     * @var string
16
     */
17
    private $path;
18
19
    /**
20
     * @var string
21
     */
22
    private $body;
23
24
    public function jsonSerialize()
25
    {
26
        return [
27
            'method' => $this->getMethod(),
28
            'path' => $this->getPath(),
29
            'body' => $this->getBody()
30
        ];
31
    }
32
33
    public function getMethod(): string
34
    {
35
        return $this->method;
36
    }
37
38
    public function setMethod(string $method): BatchOperation
39
    {
40
        $this->method = $method;
41
        return $this;
42
    }
43
44
    public function getPath(): string
45
    {
46
        return $this->path;
47
    }
48
49
    public function setPath(string $path): BatchOperation
50
    {
51
        $this->path = $path;
52
        return $this;
53
    }
54
55
    public function getBody(): string
56
    {
57
        return $this->body;
58
    }
59
60
    public function setBody(string $body): BatchOperation
61
    {
62
        $this->body = $body;
63
        return $this;
64
    }
65
}
66