ResolverCommand::getEventDetailsArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the XiideaEasyAuditBundle package.
5
 *
6
 * (c) Xiidea <http://www.xiidea.net>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Xiidea\EasyAuditBundle\Resolver\UserEventCommand;
13
14
abstract class ResolverCommand
15
{
16
    /**
17
     * @param string $username
18
     *
19
     * @return array
20
     */
21
    protected function getEventDetailsArray($username)
22
    {
23
        return array(
24
            'type' => $this->getType(),
25
            'description' => sprintf($this->getTemplate(), $username),
26
        );
27
    }
28
29
    /**
30
     * @param \Symfony\Contracts\EventDispatcher\Event $event
31
     *
32
     * @return mixed
33
     */
34
    abstract public function resolve($event);
35
36
    /**
37
     * @return string
38
     */
39
    abstract public function getType();
40
41
    /**
42
     * @return string
43
     */
44
    abstract public function getTemplate();
45
}
46