CommandHandlerAndAggregate::getCommandHandler()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/******************************************************************************
3
 * Copyright (c) 2017 Constantin Galbenu <[email protected]>             *
4
 ******************************************************************************/
5
6
namespace Gica\Cqrs\Command\ValueObject;
7
8
9
class CommandHandlerAndAggregate
10
{
11
12
    /**
13
     * @var CommandHandlerDescriptor
14
     */
15
    private $commandHandler;
16
    private $aggregate;
17
18 9
    public function __construct(
19
        CommandHandlerDescriptor $commandHandler,
20
        $aggregate
21
    )
22
    {
23 9
        $this->commandHandler = $commandHandler;
24 9
        $this->aggregate = $aggregate;
25 9
    }
26
27
    /**
28
     * @return CommandHandlerDescriptor
29
     */
30 9
    public function getCommandHandler(): CommandHandlerDescriptor
31
    {
32 9
        return $this->commandHandler;
33
    }
34
35 9
    public function getAggregate()
36
    {
37 9
        return $this->aggregate;
38
    }
39
}