MultiCallTransportEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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\MultiCallQueueInterface;
17
use Smalot\Magento\RemoteAdapterInterface;
18
19
/**
20
 * Class MultiCallTransportEvent
21
 *
22
 * @package Smalot\MagentoBundle\Event
23
 */
24 View Code Duplication
class MultiCallTransportEvent 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 MultiCallQueueInterface
28
     */
29
    protected $queue;
30
31
    /**
32
     * @var mixed
33
     */
34
    protected $results;
35
36
    /**
37
     * @param RemoteAdapterInterface  $remoteAdapter
38
     * @param MultiCallQueueInterface $queue
39
     * @param mixed                   $results
40
     */
41
    public function __construct(RemoteAdapterInterface $remoteAdapter, MultiCallQueueInterface $queue, $results = null)
42
    {
43
        $this->remoteAdapter = $remoteAdapter;
44
        $this->queue         = $queue;
45
        $this->results       = $results;
46
    }
47
48
    /**
49
     * @param MultiCallQueueInterface $queue
50
     */
51
    public function setQueue(MultiCallQueueInterface $queue)
52
    {
53
        $this->queue = $queue;
54
    }
55
56
    /**
57
     * @return MultiCallQueueInterface
58
     */
59
    public function getQueue()
60
    {
61
        return $this->queue;
62
    }
63
64
    /**
65
     * @param array $results
66
     */
67
    public function setResults($results)
68
    {
69
        $this->results = $results;
70
    }
71
72
    /**
73
     * @return mixed
74
     */
75
    public function getResults()
76
    {
77
        return $this->results;
78
    }
79
}
80