Completed
Pull Request — dev (#50)
by Arnaud
03:27
created

ActionCreateEvent::setActionConfiguration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace LAG\AdminBundle\Action\Event;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8 View Code Duplication
class ActionCreateEvent extends Event
1 ignored issue
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @var array
12
     */
13
    protected $actionConfiguration;
14
15
    /**
16
     * @var string
17
     */
18
    protected $actionName;
19
20
    /**
21
     * @var AdminInterface
22
     */
23
    protected $admin;
24
25
    /**
26
     * ActionCreateEvent constructor.
27
     *
28
     * @param string $actionName
29
     * @param array $actionConfiguration
30
     * @param AdminInterface $admin
31
     */
32
    public function __construct($actionName, array $actionConfiguration, AdminInterface $admin)
33
    {
34
        $this->actionConfiguration = $actionConfiguration;
35
        $this->actionName = $actionName;
36
        $this->admin = $admin;
37
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function getActionConfiguration()
43
    {
44
        return $this->actionConfiguration;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getActionName()
51
    {
52
        return $this->actionName;
53
    }
54
55
    /**
56
     * @return AdminInterface
57
     */
58
    public function getAdmin()
59
    {
60
        return $this->admin;
61
    }
62
63
    /**
64
     * @param array $actionConfiguration
65
     */
66
    public function setActionConfiguration($actionConfiguration)
67
    {
68
        $this->actionConfiguration = $actionConfiguration;
69
    }
70
}
71