DatagridValuesReader::getDatagridValues()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 7
rs 10
cc 2
nc 2
nop 1
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