Code Duplication    Length = 63-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

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