Completed
Push — master ( bce2bd...fc52ee )
by Douglas
01:38
created

CommandBus   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A post() 0 4 1
1
<?php
2
3
/**
4
 * (c) 2018 Douglas Reith.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
declare(strict_types=1);
10
11
namespace Reith\ToyRobot\Infrastructure\Bus;
12
13
use Reith\ToyRobot\Messaging\BusInterface;
14
use Reith\ToyRobot\Messaging\MessageInterface;
15
16
class CommandBus implements BusInterface
17
{
18
    private $handlers;
19
20 7
    public function __construct(array $handlers)
21
    {
22 7
        $this->handlers = $handlers;
23 7
    }
24
25 1
    public function post($message): void
26
    {
27
        // do some posting
28 1
    }
29
}
30