SingleCallTransportEvent::getAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @project Magento Bridge for Symfony 2.
5
 *
6
 * @author  Sébastien MALOT <[email protected]>
7
 * @license MIT
8
 * @url     <https://github.com/smalot/magento-bundle>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Smalot\MagentoBundle\Event;
15
16
use Smalot\Magento\ActionInterface;
17
use Smalot\Magento\RemoteAdapterInterface;
18
19
/**
20
 * Class SingleCallTransportEvent
21
 *
22
 * @package Smalot\MagentoBundle\Event
23
 */
24 View Code Duplication
class SingleCallTransportEvent extends AbstractEvent
0 ignored issues
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...
25
{
26
    /**
27
     * @var ActionInterface
28
     */
29
    protected $action;
30
31
    /**
32
     * @var mixed
33
     */
34
    protected $result;
35
36
    /**
37
     * @param RemoteAdapterInterface $remoteAdapter
38
     * @param ActionInterface        $action
39
     * @param mixed                  $result
40
     */
41
    public function __construct(RemoteAdapterInterface $remoteAdapter, ActionInterface $action, $result = null)
42
    {
43
        $this->remoteAdapter = $remoteAdapter;
44
        $this->action        = $action;
45
        $this->result        = $result;
46
    }
47
48
    /**
49
     * @param ActionInterface $action
50
     */
51
    public function setAction(ActionInterface $action)
52
    {
53
        $this->action = $action;
54
    }
55
56
    /**
57
     * @return ActionInterface
58
     */
59
    public function getAction()
60
    {
61
        return $this->action;
62
    }
63
64
    /**
65
     * @param $result
66
     */
67
    public function setResult($result)
68
    {
69
        $this->result = $result;
70
    }
71
72
    /**
73
     * @return mixed
74
     */
75
    public function getResult()
76
    {
77
        return $this->result;
78
    }
79
}
80