LogOutUserService   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\LogOut;
14
15
use BenGorUser\User\Application\Command\LogOut\LogOutUserHandler;
16
use Ddd\Application\Service\ApplicationService;
17
18
/**
19
 * User logout service class.
20
 *
21
 * @author Beñat Espiña <[email protected]>
22
 * @author Gorka Laucirica <[email protected]>
23
 */
24
class LogOutUserService implements ApplicationService
25
{
26
    /**
27
     * The command handler.
28
     *
29
     * @var LogOutUserHandler
30
     */
31
    private $handler;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param LogOutUserHandler $aHandler The command handler
37
     */
38
    public function __construct(LogOutUserHandler $aHandler)
39
    {
40
        $this->handler = $aHandler;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function execute($request = null)
47
    {
48
        $this->handler->__invoke($request);
49
    }
50
}
51