Passed
Push — master ( d4f709...8319cd )
by Mike
07:40 queued 01:16
created

Implementation   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 0
dl 0
loc 72
ccs 0
cts 26
cp 0
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 1
A getCommandSerializer() 0 4 1
A getCommandIdGenerator() 0 4 1
A getClock() 0 4 1
A getCommandBusAdapter() 0 4 1
A getErrorHandler() 0 4 1
A getQueueResolver() 0 4 1
A getQueueDriver() 0 4 1
A getSchedulerDriver() 0 4 1
1
<?php
2
3
namespace MGDigital\BusQue;
4
5
class Implementation
6
{
7
8
    private $queueResolver;
9
    private $commandSerializer;
10
    private $commandIdGenerator;
11
    private $queueDriver;
12
    private $schedulerDriver;
13
    private $clock;
14
    private $commandBusAdapter;
15
    private $errorHandler;
16
17
    public function __construct(
18
        QueueResolverInterface $queueResolver,
19
        CommandSerializerInterface $commandSerializer,
20
        CommandIdGeneratorInterface $commandIdGenerator,
21
        QueueDriverInterface $queueDriver,
22
        SchedulerDriverInterface $schedulerDriver,
23
        ClockInterface $clock,
24
        CommandBusAdapterInterface $commandBusAdapter,
25
        ErrorHandlerInterface $errorHandler
26
    ) {
27
        $this->queueResolver = $queueResolver;
28
        $this->commandSerializer = $commandSerializer;
29
        $this->commandIdGenerator = $commandIdGenerator;
30
        $this->queueDriver = $queueDriver;
31
        $this->schedulerDriver = $schedulerDriver;
32
        $this->clock = $clock;
33
        $this->commandBusAdapter = $commandBusAdapter;
34
        $this->errorHandler = $errorHandler;
35
    }
36
37
    public function getQueueResolver(): QueueResolverInterface
38
    {
39
        return $this->queueResolver;
40
    }
41
42
    public function getCommandSerializer(): CommandSerializerInterface
43
    {
44
        return $this->commandSerializer;
45
    }
46
47
    public function getCommandIdGenerator(): CommandIdGeneratorInterface
48
    {
49
        return $this->commandIdGenerator;
50
    }
51
52
    public function getQueueDriver(): QueueDriverInterface
53
    {
54
        return $this->queueDriver;
55
    }
56
57
    public function getSchedulerDriver(): SchedulerDriverInterface
58
    {
59
        return $this->schedulerDriver;
60
    }
61
62
    public function getClock(): ClockInterface
63
    {
64
        return $this->clock;
65
    }
66
67
    public function getCommandBusAdapter(): CommandBusAdapterInterface
68
    {
69
        return $this->commandBusAdapter;
70
    }
71
72
    public function getErrorHandler(): ErrorHandlerInterface
73
    {
74
        return $this->errorHandler;
75
    }
76
}
77