PostExecuteActionEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResponse() 0 4 1
A setResponse() 0 4 1
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Event;
4
5
use Pim\Bundle\CustomEntityBundle\Action\ActionInterface;
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * @author    Antoine Guigan <[email protected]>
10
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
11
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
12
 */
13
class PostExecuteActionEvent extends ActionEvent
14
{
15
    /**
16
     * @var Response
17
     */
18
    protected $response;
19
20
    /**
21
     * @param ActionInterface $action
22
     * @param Response        $response
23
     */
24
    public function __construct(ActionInterface $action, Response $response)
25
    {
26
        parent::__construct($action);
27
28
        $this->response = $response;
29
    }
30
31
    /**
32
     * Returns the response created by the action
33
     *
34
     * @return Response
35
     */
36
    public function getResponse()
37
    {
38
        return $this->response;
39
    }
40
41
    /**
42
     * Changes the response returned by the action
43
     *
44
     * @param Response $response
45
     */
46
    public function setResponse(Response $response)
47
    {
48
        $this->response = $response;
49
    }
50
}
51