Code Duplication    Length = 48-63 lines in 2 locations

Action/Event/ActionCreateEvent.php 1 location

@@ 8-70 (lines=63) @@
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class ActionCreateEvent extends Event
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

Action/Event/BeforeConfigurationEvent.php 1 location

@@ 8-55 (lines=48) @@
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class BeforeConfigurationEvent extends Event
9
{
10
    /**
11
     * @var AdminInterface
12
     */
13
    protected $admin;
14
15
    /**
16
     * @var string
17
     */
18
    protected $actionName;
19
20
    /**
21
     * @var array
22
     */
23
    protected $actionConfiguration;
24
25
    public function __construct($actionName, $actionConfiguration, AdminInterface $admin)
26
    {
27
        $this->actionName = $actionName;
28
        $this->actionConfiguration = $actionConfiguration;
29
        $this->admin = $admin;
30
    }
31
32
    /**
33
     * @return AdminInterface
34
     */
35
    public function getAdmin()
36
    {
37
        return $this->admin;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getActionName()
44
    {
45
        return $this->actionName;
46
    }
47
48
    /**
49
     * @return array
50
     */
51
    public function getActionConfiguration()
52
    {
53
        return $this->actionConfiguration;
54
    }
55
}
56