Completed
Push — master ( fffb97...85dbdb )
by Dmitry
03:32
created

Request   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 78
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getService() 0 4 1
A getMethod() 0 4 1
A getParams() 0 4 1
A getCredentials() 0 4 1
A getHeaders() 0 4 1
1
<?php
2
/**
3
 * @author Dmitry Gladyshev <[email protected]>
4
 * @date 17/08/2016 13:52
5
 */
6
7
namespace Yandex\Direct\Transport;
8
9
use Yandex\Direct\ConfigurableTrait;
10
use Yandex\Direct\CredentialsInterface;
11
12
/**
13
 * Class TransportRequest
14
 * @package Yandex\Direct
15
 */
16
class Request implements RequestInterface
17
{
18
    use ConfigurableTrait;
19
20
    /**
21
     * @var string
22
     */
23
    protected $method;
24
25
    /**
26
     * @var string
27
     */
28
    protected $service;
29
30
    /**
31
     * @var array
32
     */
33
    protected $params = [];
34
35
    /**
36
     * @var array
37
     */
38
    protected $headers = [];
39
40
    /**
41
     * @var CredentialsInterface
42
     */
43
    protected $credentials;
44
45
    /**
46
     * Request constructor.
47
     * @param array $requestAttributes
48
     */
49 2
    public function __construct(array $requestAttributes = [])
50
    {
51 2
        $this->setOptions($requestAttributes);
52 2
    }
53
54
    /**
55
     * @return string
56
     */
57 1
    public function getService()
58
    {
59 1
        return $this->service;
60
    }
61
62
    /**
63
     * @return string
64
     */
65 1
    public function getMethod()
66
    {
67 1
        return $this->method;
68
    }
69
70
    /**
71
     * @return array
72
     */
73 1
    public function getParams()
74
    {
75 1
        return $this->params;
76
    }
77
78
    /**
79
     * @inheritdoc
80
     */
81 1
    public function getCredentials()
82
    {
83 1
        return $this->credentials;
84
    }
85
86
    /**
87
     * @inheritdoc
88
     */
89 1
    public function getHeaders()
90
    {
91 1
        return $this->headers;
92
    }
93
}
94