Completed
Push — master ( c432ac...8e117f )
by Mathijs
04:01
created

JobQueueCreate   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 9
lcom 1
cbo 1
dl 0
loc 96
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setAutoDelete() 0 4 1
A setDurable() 0 4 1
A getArguments() 0 4 1
A addArgument() 0 4 1
A getVirtualHost() 0 4 1
A getQueueName() 0 4 1
A isAutoDelete() 0 4 1
A isDurable() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace mcorten87\rabbitmq_api\jobs;
4
5
use mcorten87\rabbitmq_api\objects\Password;
6
use mcorten87\rabbitmq_api\objects\QueueArgument;
7
use mcorten87\rabbitmq_api\objects\QueueName;
8
use mcorten87\rabbitmq_api\objects\User;
9
use mcorten87\rabbitmq_api\objects\VirtualHost;
10
11
class JobQueueCreate extends JobBase
12
{
13
    /**
14
     * @var VirtualHost
15
     */
16
    private $virtualHost;
17
18
    /**
19
     * @var QueueName
20
     */
21
    private $queueName;
22
23
    /**
24
     * @var bool
25
     */
26
    private $autoDelete = false;
27
28
    /**
29
     * @var bool
30
     */
31
    private $durable = false;
32
33
    /**
34
     * @var QueueArgument[]
35
     */
36
    private $arguments = [];
37
38
39
    /**
40
     * @param boolean $autoDelete
41
     */
42
    public function setAutoDelete($autoDelete)
43
    {
44
        $this->autoDelete = $autoDelete;
45
    }
46
47
    /**
48
     * @param boolean $durable
49
     */
50
    public function setDurable($durable)
51
    {
52
        $this->durable = $durable;
53
    }
54
55
    /**
56
     * @return \mcorten87\rabbitmq_api\objects\QueueArgument[]
57
     */
58
    public function getArguments()
59
    {
60
        return $this->arguments;
61
    }
62
63
    /**
64
     * @param QueueArgument[] $arguments
0 ignored issues
show
Bug introduced by
There is no parameter named $arguments. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
65
     */
66
    public function addArgument(QueueArgument $newArgument)
67
    {
68
        $this->arguments[] = $newArgument;
69
    }
70
71
    /** @return VirtualHost */
72
    public function getVirtualHost() : VirtualHost
73
    {
74
        return $this->virtualHost;
75
    }
76
77
    /**
78
     * @return QueueName
79
     */
80
    public function getQueueName()
81
    {
82
        return $this->queueName;
83
    }
84
85
    /**
86
     * @return boolean
87
     */
88
    public function isAutoDelete()
89
    {
90
        return $this->autoDelete;
91
    }
92
93
    /**
94
     * @return boolean
95
     */
96
    public function isDurable()
97
    {
98
        return $this->durable;
99
    }
100
101
    public function __construct(VirtualHost $virtualHost, QueueName $queueName)
102
    {
103
        $this->virtualHost = $virtualHost;
104
        $this->queueName = $queueName;
105
    }
106
}
107