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

ShowReader::configureFields()   C

Complexity

Conditions 13
Paths 66

Size

Total Lines 118
Code Lines 61

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 61
c 2
b 0
f 0
dl 0
loc 118
rs 6.6166
cc 13
nc 66
nop 2

How to fix   Long Method    Complexity   

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\ShowField;
9
10
/**
11
 * Show configuration reader.
12
 *
13
 * @author Marko Kunic <[email protected]>
14
 * @author Mathieu Wambre <[email protected]>
15
 */
16
final class ShowReader extends AbstractFieldConfigurationReader
17
{
18
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function __construct(Reader $annotationReader)
23
    {
24
        parent::__construct($annotationReader, ShowField::class);
25
    }
26
27
}
28