Hash   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 16
ccs 7
cts 7
cp 1
rs 10
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getParameters() 0 3 1
A __construct() 0 7 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pgs\HashIdBundle\Annotation;
6
7
/**
8
 * @Annotation
9
 * @Target({"METHOD"})
10
 */
11
class Hash
12
{
13
    private $parameters;
14
15 5
    public function __construct(array $parameters)
16
    {
17 5
        if (isset($parameters['value']) && \is_array($parameters['value'])) {
18 2
            $parameters = $parameters['value'];
19
        }
20
21 5
        $this->parameters = $parameters;
22 5
    }
23
24 5
    public function getParameters(): array
25
    {
26 5
        return $this->parameters;
27
    }
28
}
29