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

CommandBus::post()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

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 1
nc 1
nop 1
crap 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