Completed
Push — master ( f9ded0...b13d5b )
by John
02:58 queued 01:00
created

ParsedHeaders   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 37
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getContentType() 0 4 1
A getAcceptableMIMETypes() 0 4 1
A getAPIKey() 0 4 1
1
<?php
2
namespace LunixREST\APIRequest\HeaderParser;
3
4
class ParsedHeaders
5
{
6
    /**
7
     * @var array
8
     */
9
    private $acceptableMIMETypes;
10
    private $APIKey;
11
    private $contentType;
12
13
    /**
14
     * ParsedHeader constructor.
15
     * @param $contentType
16
     * @param array $acceptableMIMETypes
17
     * @param $APIKey
18
     */
19 6
    public function __construct($contentType, array $acceptableMIMETypes, $APIKey)
20
    {
21 6
        $this->contentType = $contentType;
22 6
        $this->acceptableMIMETypes = $acceptableMIMETypes;
23 6
        $this->APIKey = $APIKey;
24 6
    }
25
26 2
    public function getContentType()
27
    {
28 2
        return $this->contentType;
29
    }
30
31 1
    public function getAcceptableMIMETypes(): array
32
    {
33 1
        return $this->acceptableMIMETypes;
34
    }
35
36 3
    public function getAPIKey()
37
    {
38 3
        return $this->APIKey;
39
    }
40
}
41