Completed
Push — master ( e6719d...13ae3c )
by John
01:53
created

ParsedHeaders   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

4 Methods

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