Completed
Pull Request — dev (#9)
by Arnaud
12:24
created

AdminEvent   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 73.32%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 7
c 3
b 1
f 0
lcom 0
cbo 1
dl 0
loc 89
rs 10
ccs 11
cts 15
cp 0.7332

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setConfiguration() 0 6 1
A getConfiguration() 0 4 1
A getAdmin() 0 4 1
A setAdmin() 0 6 1
A getActionName() 0 4 1
A setActionName() 0 4 1
A setAdminName() 0 6 1
1
<?php
2
3
namespace LAG\AdminBundle\Event;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class AdminEvent extends Event
9
{
10
    const ADMIN_CREATE = 'event.admin.create';
11
    const ACTION_CREATE = 'event.action.create';
12
13
    protected $configuration;
14
15
    /**
16
     * Related Admin name.
17
     *
18
     * @var string
19
     */
20
    protected $adminName;
21
22
    /**
23
     * @var AdminInterface
24
     */
25
    protected $admin;
26
27
    /**
28
     * @var string
29 6
     */
30
    protected $actionName;
31 6
32
    /**
33 6
     * @param array $configuration
34
     * @return AdminEvent
35
     */
36
    public function setConfiguration(array $configuration)
37
    {
38
        $this->configuration = $configuration;
39 6
40
        return $this;
41 6
    }
42
43
    /**
44
     * @return array
45
     */
46
    public function getConfiguration()
47
    {
48
        return $this->configuration;
49
    }
50
51
    /**
52
     * @return AdminInterface
53
     */
54
    public function getAdmin()
55
    {
56 5
        return $this->admin;
57
    }
58 5
59
    /**
60 5
     * @param AdminInterface $admin
61
     * @return $this
62
     */
63
    public function setAdmin($admin)
64
    {
65
        $this->admin = $admin;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getActionName()
74 5
    {
75
        return $this->actionName;
76 5
    }
77 5
78
    /**
79
     * @param string $actionName
80
     */
81
    public function setActionName($actionName)
82
    {
83
        $this->actionName = $actionName;
84
    }
85
86
    /**
87
     * @param string $adminName
88
     * @return AdminEvent
89
     */
90
    public function setAdminName($adminName)
91
    {
92
        $this->adminName = $adminName;
93
94
        return $this;
95
    }
96
}
97