ExtraFieldsTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getExtraFields() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CCT\Kong\Model\Structure;
6
7
use CCT\Component\Collections\ParameterCollection;
8
use CCT\Component\Collections\CollectionInterface;
9
10
trait ExtraFieldsTrait
11
{
12
    protected $extraFields;
13
14 1
    public function getExtraFields(): CollectionInterface
15
    {
16 1
        if (null === $this->extraFields) {
17 1
            $this->extraFields = new ParameterCollection();
18
        }
19
20 1
        return $this->extraFields;
21
    }
22
}
23