Passed
Push — develop ( b8535a...b19a66 )
by Mathieu
11:29
created

ShowReader::getAdminAnnotationFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Neimheadh\SonataAnnotationBundle\Reader;
6
7
use Doctrine\Common\Annotations\Reader;
8
use Neimheadh\SonataAnnotationBundle\Annotation\Sonata\Admin;
9
use Neimheadh\SonataAnnotationBundle\Annotation\Sonata\ShowField;
10
11
/**
12
 * Show configuration reader.
13
 *
14
 * @author Marko Kunic <[email protected]>
15
 * @author Mathieu Wambre <[email protected]>
16
 */
17
final class ShowReader extends AbstractFieldConfigurationReader
18
{
19
20
    /**
21
     * {@inheritDoc}
22
     */
23
    public function __construct(Reader $annotationReader)
24
    {
25
        parent::__construct($annotationReader, ShowField::class);
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    protected function getAdminAnnotationFields(
32
        Admin $annotation,
33
        ?string $action
34
    ): array {
35
        return $annotation->getShowFields();
36
    }
37
38
}
39