ExtraFieldsTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
ccs 0
cts 6
cp 0
rs 10
c 1
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\Component\Rest\Model\Structure;
6
7
use CCT\Component\Collections\ArrayCollection;
8
use CCT\Component\Collections\CollectionInterface;
9
10
trait ExtraFieldsTrait
11
{
12
    protected $extraFields;
13
14
    public function getExtraFields(): CollectionInterface
15
    {
16
        if (null === $this->extraFields) {
17
            $this->extraFields = new ArrayCollection();
18
        }
19
20
        return $this->extraFields;
21
    }
22
}
23