Completed
Push — master ( e000b3...b0a3db )
by Christopher
06:52 queued 48s
created

AggregateRoot   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setBalance() 0 4 1
A setOwner() 0 4 1
1
<?php namespace C4tech\RayEmitter\Example\BankAccount;
2
3
use C4tech\RayEmitter\Contracts\Domain\AggregateRoot as AggregateRootInterface;
4
use C4tech\RayEmitter\Domain\AggregateRoot as RootTrait;
5
6
final class AggregateRoot extends Entity implements AggregateRootInterface
7
{
8
    use RootTrait;
9
10
    /**
11
     * Account balance
12
     * @var UsDollar
13
     */
14
    private $balance;
15
16
    /**
17
     * Owner name
18
     * @var OwnerName
19
     */
20
    private $owner;
21
22
    protected function setBalance(UsDollar $value)
23
    {
24
        $this->balance = $value;
25
    }
26
27
    protected function setOwner(OwnerName $value)
28
    {
29
        $this->owner = $value;
30
    }
31
}
32