Passed
Push — main ( 31df87...01449a )
by Evgenii
02:07
created

CustomRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 42.86%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 8
c 1
b 0
f 0
dl 0
loc 42
ccs 6
cts 14
cp 0.4286
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setOperationName() 0 3 1
A setBody() 0 3 1
A __construct() 0 10 1
A setDeviceUUID() 0 3 1
1
<?php
2
3
4
namespace floor12\MindBox\Requests;
5
6
7
class CustomRequest extends MindBoxRequest
8
{
9
    /**
10
     * @param string|null $operationName
11
     * @param array|null $body
12
     * @param int|null $mode
13
     * @param string|null $deviceUUID
14
     */
15 1
    public function __construct(
16
        string $operationName = null,
17
        array $body = null,
18
        int $mode = null,
19
        string $deviceUUID = null)
20
    {
21 1
        $this->operationName = $operationName;
22 1
        $this->body = $body;
23 1
        $this->mode = $mode;
24 1
        $this->deviceUUID = $deviceUUID;
25 1
    }
26
27
    /**
28
     * @param mixed $operationName
29
     */
30
    public function setOperationName($operationName): void
31
    {
32
        $this->operationName = $operationName;
33
    }
34
35
    /**
36
     * @param string $deviceUUID
37
     */
38
    public function setDeviceUUID(string $deviceUUID): void
39
    {
40
        $this->deviceUUID = $deviceUUID;
41
    }
42
43
    /**
44
     * @param array $body
45
     */
46
    public function setBody(array $body): void
47
    {
48
        $this->body = $body;
49
    }
50
51
52
}
53