Passed
Push — master ( d4e337...e0198f )
by Martin
02:43
created

Collection::build()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 19
Code Lines 10

Duplication

Lines 19
Ratio 100 %

Code Coverage

Tests 11
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 10
nc 3
nop 0
dl 19
loc 19
ccs 11
cts 11
cp 1
crap 3
rs 9.4285
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A Collection::mapData() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace KingsonDe\Marshal\Data;
6
7
class Collection extends AbstractDataStructure {
8
9
    use CollectionTrait;
10
11
    /**
12
     * @inheritdoc
13
     */
14 6
    protected function mapData($model, ...$data) {
15
        /** @noinspection PhpUndefinedMethodInspection */
16 6
        return $this->getMapper()->map($model, ...$data);
0 ignored issues
show
Bug introduced by
The method map() does not exist on KingsonDe\Marshal\AbstractMapper. Since it exists in all sub-types, consider adding an abstract or default implementation to KingsonDe\Marshal\AbstractMapper. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        return $this->getMapper()->/** @scrutinizer ignore-call */ map($model, ...$data);
Loading history...
17
    }
18
}
19