Passed
Push — main ( 6c9276...76dcd0 )
by Anatoly
06:53 queued 02:07
created

Context   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
/**
4
 * It's free open-source software released under the MIT License.
5
 *
6
 * @author Anatoly Nekhay <[email protected]>
7
 * @copyright Copyright (c) 2021, Anatoly Nekhay
8
 * @license https://github.com/sunrise-php/hydrator/blob/master/LICENSE
9
 * @link https://github.com/sunrise-php/hydrator
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sunrise\Hydrator\Annotation;
15
16
use Attribute;
17
18
/**
19
 * @Annotation
20
 * @Target({"PROPERTY"})
21
 * @NamedArgumentConstructor
22
 *
23
 * @Attributes({
24
 *     @Attribute("value", type="array", required=true),
25
 * })
26
 *
27
 * @since 3.2.0
28
 */
29
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_PARAMETER)]
30
final class Context
31
{
32
33
    /**
34
     * The attribute value
35
     *
36
     * @var array<non-empty-string, mixed>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string, mixed> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string, mixed>.
Loading history...
37
     *
38
     * @readonly
39
     */
40
    public array $value;
41
42
    /**
43
     * Constructor of the class
44
     *
45
     * @param array<non-empty-string, mixed> $value
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string, mixed> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string, mixed>.
Loading history...
46
     */
47
    public function __construct(array $value)
48
    {
49
        $this->value = $value;
50
    }
51
}
52