HydrationKey::getKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Maiorano\ObjectHydrator\Attributes;
4
5
use Attribute;
6
7
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD)]
8
final class HydrationKey
9
{
10
    /**
11
     * @var string
12
     */
13
    private string $key;
14
15
    /**
16
     * @param string $key
17
     */
18 23
    public function __construct(string $key)
19
    {
20 23
        $this->key = $key;
21 23
    }
22
23
    /**
24
     * @return string
25
     */
26 16
    public function getKey(): string
27
    {
28 16
        return $this->key;
29
    }
30
}
31