Completed
Push — master ( 07270e...430475 )
by Dominik
06:51
created

NegotiatedValue::getAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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