Completed
Push — master ( 39414a...158aae )
by Beñat
02:54
created

SimpleBusQueryBus::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Shared Kernel library.
5
 *
6
 * Copyright (c) 2016 LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LIN3S\SharedKernel\Infrastructure\Application\SimpleBus;
13
14
use Ajgl\SimpleBus\Message\Bus\CatchReturnMessageBus;
15
use LIN3S\SharedKernel\Application\QueryBus;
16
17
/**
18
 * @author Beñat Espiña <[email protected]>
19
 */
20
class SimpleBusQueryBus implements QueryBus
21
{
22
    private $messageBus;
23
24
    public function __construct(CatchReturnMessageBus $messageBus)
25
    {
26
        $this->messageBus = $messageBus;
27
    }
28
29
    public function handle($query, &$result)
30
    {
31
        $this->messageBus->handle($query, $result);
32
    }
33
}
34