ChildEntityBehavior   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isNew() 0 3 1
A markAsPersisted() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TalisOrm;
5
6
trait ChildEntityBehavior
7
{
8
9
    /**
10
     * @var bool
11
     */
12
    private $isNew = true;
13
14 14
    public function isNew(): bool
15
    {
16 14
        return $this->isNew;
17
    }
18
19 12
    public function markAsPersisted(): void
20
    {
21 12
        $this->isNew = false;
22 12
    }
23
}
24