CommandHandlerAndAggregate   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 31
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getCommandHandler() 0 4 1
A getAggregate() 0 4 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
}