Completed
Push — master ( 0a059e...292010 )
by John
02:21
created

ParsedHeaders::getAPIKey()   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
namespace LunixREST\RequestFactory\HeaderParser;
3
4
/**
5
 * This object represents the data pulled from headers for an APIRequest.
6
 * Class ParsedHeaders
7
 * @package LunixREST\RequestFactory\HeaderParser
8
 */
9
class ParsedHeaders
10
{
11
    /**
12
     * @var array
13
     */
14
    private $acceptableMIMETypes;
15
    /**
16
     * @var
17
     */
18
    private $APIKey;
19
    /**
20
     * @var
21
     */
22
    private $contentType;
23
24
    /**
25
     * ParsedHeader constructor.
26
     * @param $contentType
27
     * @param array $acceptableMIMETypes
28
     * @param $APIKey
29
     */
30 6
    public function __construct($contentType, array $acceptableMIMETypes, $APIKey)
31
    {
32 6
        $this->contentType = $contentType;
33 6
        $this->acceptableMIMETypes = $acceptableMIMETypes;
34 6
        $this->APIKey = $APIKey;
35 6
    }
36
37
    /**
38
     * @return mixed
39
     */
40 2
    public function getContentType()
41
    {
42 2
        return $this->contentType;
43
    }
44
45
    /**
46
     * @return array
47
     */
48 1
    public function getAcceptableMIMETypes(): array
49
    {
50 1
        return $this->acceptableMIMETypes;
51
    }
52
53
    /**
54
     * @return mixed
55
     */
56 3
    public function getAPIKey()
57
    {
58 3
        return $this->APIKey;
59
    }
60
}
61