ActionEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAction() 0 4 1
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Event;
4
5
use Pim\Bundle\CustomEntityBundle\Action\ActionInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * Basic event for actions
10
 *
11
 * @author    Antoine Guigan <[email protected]>
12
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
13
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
14
 */
15
class ActionEvent extends Event
16
{
17
    /**
18
     * @var ActionInterface
19
     */
20
    protected $action;
21
22
    /**
23
     * @param ActionInterface $action
24
     */
25
    public function __construct(ActionInterface $action)
26
    {
27
        $this->action = $action;
28
    }
29
30
    /**
31
     * Returns the action launched by the event
32
     *
33
     * @return ActionInterface
34
     */
35
    public function getAction()
36
    {
37
        return $this->action;
38
    }
39
}
40