Passed
Push — master ( 854b7d...2bd34a )
by Dominik
01:59
created

Content::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\ApiHttp\Negotiation;
6
7
final class Content
8
{
9
    /**
10
     * @var string
11
     */
12
    private $contentType;
13
14
    /**
15
     * @var array
16
     */
17
    private $attributes;
18
19
    /**
20
     * @param string $contentType
21
     * @param array  $attributes
22
     */
23
    public function __construct(string $contentType, array $attributes)
24
    {
25
        $this->contentType = $contentType;
26
        $this->attributes = $attributes;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getContentType(): string
33
    {
34
        return $this->contentType;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getAttributes(): array
41
    {
42
        return $this->attributes;
43
    }
44
}
45