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

Request::getLanguage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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