Completed
Push — master ( 3e3d3c...053aa5 )
by Olivier
01:44
created

QueryHandlerProviderPass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <[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 ICanBoogie\MessageBus\Symfony;
13
14
use ICanBoogie\MessageBus\PSR\QueryHandlerProvider;
15
16
/**
17
 * Register a query handler provider.
18
 *
19
 * ```yaml
20
 * services:
21
 *   Acme\MenuService\Application\Query\ShowMenuHandler:
22
 *     tags:
23
 *     - name: query_dispatcher.handler
24
 *       command: Acme\MenuService\Application\Query\ShowMenu
25
 * ```
26
 */
27
final class QueryHandlerProviderPass extends HandlerProviderPass
28
{
29
    public const DEFAULT_SERVICE_ID = QueryHandlerProvider::class;
30
    public const DEFAULT_HANDLER_TAG = 'query_dispatcher.handler';
31
    public const DEFAULT_MESSAGE_PROPERTY = 'query';
32
    public const DEFAULT_PROVIDER_CLASS = QueryHandlerProvider::class;
33
34
    public function __construct(
35
        string $serviceId = self::DEFAULT_SERVICE_ID,
36
        string $handlerTag = self::DEFAULT_HANDLER_TAG,
37
        string $messageProperty = self::DEFAULT_MESSAGE_PROPERTY,
38
        string $providerClass = self::DEFAULT_PROVIDER_CLASS
39
    ) {
40
        parent::__construct($serviceId, $handlerTag, $messageProperty, $providerClass);
41
    }
42
}
43