DatagridValuesReader   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDatagridValues() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace KunicMarko\SonataAnnotationBundle\Reader;
6
7
use KunicMarko\SonataAnnotationBundle\Annotation\DatagridValues;
8
9
/**
10
 * @author Marko Kunic <[email protected]>
11
 */
12
final class DatagridValuesReader
13
{
14
    use AnnotationReaderTrait;
15
16
    public function getDatagridValues(\ReflectionClass $class): array
17
    {
18
        if ($annotation = $this->getClassAnnotation($class, DatagridValues::class)) {
19
            return $annotation->values;
20
        }
21
22
        return [];
23
    }
24
}
25