Passed
Push — master ( f7d6c6...2d02cb )
by Petr
02:57
created

PDO::fillDataFromRow()   B

Complexity

Conditions 10
Paths 11

Size

Total Lines 22
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 17
CRAP Score 10

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 22
ccs 17
cts 17
cp 1
rs 7.6666
cc 10
nc 11
nop 1
crap 10

How to fix   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
namespace kalanis\nested_tree\Sources\PDO;
4
5
use kalanis\nested_tree\Sources\SourceInterface;
6
use kalanis\nested_tree\Support;
7
use PDO as base;
8
9
abstract class PDO implements SourceInterface
10
{
11
    use Support\ColumnsTrait;
0 ignored issues
show
introduced by
The trait kalanis\nested_tree\Support\ColumnsTrait requires some properties which are not provided by kalanis\nested_tree\Sources\PDO\PDO: $parentIdColumnName, $positionColumnName, $levelColumnName, $rightColumnName, $leftColumnName, $idColumnName
Loading history...
12
    use Support\RowsTrait;
0 ignored issues
show
introduced by
The trait kalanis\nested_tree\Support\RowsTrait requires some properties which are not provided by kalanis\nested_tree\Sources\PDO\PDO: $parentIdColumnName, $positionColumnName, $levelColumnName, $rightColumnName, $leftColumnName, $rootIsNull, $idColumnName
Loading history...
13
14 120
    public function __construct(
15
        protected readonly base $pdo,
16
        protected readonly Support\Node $nodeBase,
17
        protected readonly Support\TableSettings $settings,
18
    ) {
19 120
    }
20
}
21