Passed
Push — develop ( 355f63...51016a )
by Mathieu
02:23
created

DatagridValues   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
dl 0
loc 23
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Neimheadh\SonataAnnotationBundle\Annotation\Sonata;
6
7
use Attribute;
8
use Neimheadh\SonataAnnotationBundle\Annotation\AbstractAnnotation;
9
use Neimheadh\SonataAnnotationBundle\Annotation\ArrayAnnotationTrait;
10
use ReflectionException;
11
12
/**
13
 * Datagrid values annotation.
14
 *
15
 * @Annotation
16
 * @Target("CLASS")
17
 *
18
 * @author Marko Kunic <[email protected]>
19
 * @author Mathieu Wambre <[email protected]>
20
 */
21
#[Attribute(Attribute::TARGET_CLASS)]
22
final class DatagridValues extends AbstractAnnotation
23
{
24
25
    use ArrayAnnotationTrait;
26
27
    /**
28
     * Datagrid select values.
29
     *
30
     * @var array
31
     */
32
    private array $values = [];
0 ignored issues
show
introduced by
The private property $values is not used, and could be removed.
Loading history...
33
34
    /**
35
     * @param array|string|null $values Datagrid values or annotation
36
     *                                  parameters.
37
     *
38
     * @throws ReflectionException
39
     */
40
    public function __construct(
41
        $values = []
42
    ) {
43
        $this->setArrayProperty('values', $values);
44
    }
45
46
}
47