RevokeUserRoleService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the BenGorUser package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorUser\CarlosBuenosvinosDddBridge\Application\Service\RevokeRole;
14
15
use BenGorUser\User\Application\Command\RevokeRole\RevokeUserRoleHandler;
16
use Ddd\Application\Service\ApplicationService;
17
18
/**
19
 * Revoke user role service class.
20
 *
21
 * @author Beñat Espiña <[email protected]>
22
 */
23
class RevokeUserRoleService implements ApplicationService
24
{
25
    /**
26
     * The command handler.
27
     *
28
     * @var RevokeUserRoleHandler
29
     */
30
    private $handler;
31
32
    /**
33
     * Constructor.
34
     *
35
     * @param RevokeUserRoleHandler $aHandler The command handler
36
     */
37
    public function __construct(RevokeUserRoleHandler $aHandler)
38
    {
39
        $this->handler = $aHandler;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function execute($request = null)
46
    {
47
        $this->handler->__invoke($request);
48
    }
49
}
50