Completed
Pull Request — master (#60)
by Chad
01:24
created

QueueAwareTrait::setQueue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace TraderInteractive\Mongo;
4
5
/**
6
 * Trait for QueueAwareInterface implementation.
7
 */
8
trait QueueAwareTrait
9
{
10
    /**
11
     * The mongoQueue instance.
12
     *
13
     * @var QueueInterface
14
     */
15
    private $mongoQueue;
16
17
    /**
18
     * Returns the Queue instance.
19
     *
20
     * @return QueueInterface
21
     */
22
    public function getQueue() : QueueInterface
23
    {
24
        return $this->mongoQueue;
25
    }
26
27
    /**
28
     * Sets the Queue instance.
29
     *
30
     * @param QueueInterface $mongoQueue
31
     *
32
     * @return QueueAwareInterface
33
     */
34
    public function setQueue(QueueInterface $mongoQueue)
35
    {
36
        $this->mongoQueue = $mongoQueue;
37
        return $this;
38
    }
39
}
40