Test Setup Failed
Branch master (d32f50)
by Tomasz
04:29 queued 02:26
created

UseCase::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
/**
3
 * Copyright
4
 */
5
namespace Hexarchium\CoreDomain\Model\UseCase\Entity;
6
7
use Hexarchium\CoreDomain\Aggregate\AbstractAggregateRoot;
8
use Hexarchium\CoreDomain\Model\Domain\Entity\Domain;
9
use Hexarchium\CoreDomain\Model\UseCase\UseCaseId;
10
use Hexarchium\CoreDomain\Model\UseCase\ValueObject\Type;
11
12
class UseCase extends AbstractAggregateRoot
13
{
14
    /** @var  Type */
15
    private $type;
16
17
    /** @var  Domain */
18
    private $domain;
19
20
    /**
21
     * UseCase constructor.
22
     *
23
     * @param UseCaseId $id
24
     * @param Type $type
25
     * @param Domain $domain
26
     */
27
    public function __construct(UseCaseId $id, Type $type, Domain $domain)
28
    {
29
        parent::__construct($id);
30
        $this->type = $type;
31
        $this->domain = $domain;
32
    }
33
34
    /**
35
     * @return Type
36
     */
37
    public function getType()
38
    {
39
        return $this->type;
40
    }
41
42
    /**
43
     * @return Domain
44
     */
45
    public function getDomain()
46
    {
47
        return $this->domain;
48
    }
49
}
50