Passed
Push — develop ( 3d1775...ebd477 )
by Mathieu
02:47
created

DatagridReader::configureFields()   B

Complexity

Conditions 9
Paths 17

Size

Total Lines 67
Code Lines 38

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 38
c 0
b 0
f 0
dl 0
loc 67
rs 7.7564
cc 9
nc 17
nop 2

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace KunicMarko\SonataAnnotationBundle\Reader;
6
7
use Doctrine\Common\Annotations\Reader;
8
use KunicMarko\SonataAnnotationBundle\Annotation\DatagridField;
9
10
/**
11
 * Datagrid configuration reader.
12
 *
13
 * @author Marko Kunic <[email protected]>
14
 * @author Mathieu Wambre <[email protected]>
15
 */
16
final class DatagridReader extends AbstractFieldConfigurationReader
17
{
18
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function __construct(
23
        Reader $annotationReader
24
    ) {
25
        parent::__construct($annotationReader, DatagridField::class);
26
    }
27
28
}
29