Completed
Branch master (01610a)
by Arnaud
06:29
created

AdminEvent   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 97
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 90%

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 8
c 4
b 2
f 0
lcom 0
cbo 1
dl 0
loc 97
ccs 18
cts 20
cp 0.9
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getActionName() 0 4 1
A setConfiguration() 0 6 1
A getConfiguration() 0 4 1
A setAdmin() 0 6 1
A setActionName() 0 4 1
A setAdminName() 0 6 1
A getAdmin() 0 4 1
A getAdminName() 0 4 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
     */
30
    protected $actionName;
31
32
    /**
33
     * @param array $configuration
34
     * @return AdminEvent
35
     */
36 7
    public function setConfiguration(array $configuration)
37
    {
38 7
        $this->configuration = $configuration;
39
40 7
        return $this;
41
    }
42
43
    /**
44
     * @return array
45
     */
46 7
    public function getConfiguration()
47
    {
48 7
        return $this->configuration;
49
    }
50
51
    /**
52
     * @return AdminInterface
53
     */
54 1
    public function getAdmin()
55
    {
56 1
        return $this->admin;
57
    }
58
59
    /**
60
     * @param AdminInterface $admin
61
     * @return $this
62
     */
63 6
    public function setAdmin($admin)
64
    {
65 6
        $this->admin = $admin;
66
67 6
        return $this;
68
    }
69
70
    /**
71
     * @return string
72
     */
73 1
    public function getActionName()
74
    {
75 1
        return $this->actionName;
76
    }
77
78
    /**
79
     * @param string $actionName
80
     */
81 6
    public function setActionName($actionName)
82
    {
83 6
        $this->actionName = $actionName;
84 6
    }
85
86
    /**
87
     * @param string $adminName
88
     * @return AdminEvent
89
     */
90 4
    public function setAdminName($adminName)
91
    {
92 4
        $this->adminName = $adminName;
93
94 4
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getAdminName()
101
    {
102
        return $this->adminName;
103
    }
104
}
105