Test Setup Failed
Push — master ( de81f2...3dc847 )
by Tomasz
02:50
created

Domain   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
/**
3
 * Copyright
4
 */
5
namespace Hexarchium\CoreDomain\Model\Domain\Entity;
6
7
use Hexarchium\CoreDomain\Aggregate\AbstractAggregateRoot;
8
use Hexarchium\CoreDomain\Model\Domain\DomainId;
9
use Hexarchium\CoreDomain\Model\Domain\Events\DomainCreated;
10
11
12
class Domain extends AbstractAggregateRoot
13
{
14
    /**
15
     * Domain constructor.
16
     *
17
     * @param DomainId $id
18
     */
19
    public function __construct(DomainId $id)
20
    {
21
        parent::__construct($id);
22
23
        $this->pushEvent(
24
            new DomainCreated(new \DateTime(), $this)
25
        );
26
    }
27
}