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

UseCase   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getType() 0 4 1
A getDomain() 0 4 1
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