Completed
Push — master ( 2907e3...b9c0fa )
by Alexandre
02:14
created

Queue::getMaxRetries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Heri\Bundle\JobQueueBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Heri\Bundle\JobQueueBundle\Entity\Queue.
9
 *
10
 * @ORM\Table(name="queue")
11
 * @ORM\Entity
12
 */
13
class Queue
14
{
15
    /**
16
     * @var int
17
     *
18
     * @ORM\Column(name="id", type="integer", nullable=false)
19
     * @ORM\Id
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    private $id;
23
24
    /**
25
     * @var string
26
     *
27
     * @ORM\Column(name="name", type="string", length=100, nullable=false)
28
     */
29
    private $name;
30
31
    /**
32
     * @var smallint
33
     *
34
     * @ORM\Column(name="timeout", type="smallint", nullable=false)
35
     */
36
    private $timeout;
37
38
    /**
39
     * @var int
40
     *
41
     * @ORM\Column(name="max_retries", type="integer", nullable=true)
42
     */
43
    private $maxRetries = null;
44
45
    public function __toString()
46
    {
47
        return $this->name;
48
    }
49
50
    /**
51
     * Get id.
52
     *
53
     * @return int
54
     */
55
    public function getId()
56
    {
57
        return $this->id;
58
    }
59
60
    /**
61
     * Set name.
62
     *
63
     * @param string $name
64
     */
65
    public function setName($name)
66
    {
67
        $this->name = $name;
68
    }
69
70
    /**
71
     * Get name.
72
     *
73
     * @return string
74
     */
75
    public function getName()
76
    {
77
        return $this->name;
78
    }
79
80
    /**
81
     * Set timeout.
82
     *
83
     * @param smallint $timeout
84
     */
85
    public function setTimeout($timeout)
86
    {
87
        $this->timeout = $timeout;
88
    }
89
90
    /**
91
     * Get timeout.
92
     *
93
     * @return smallint
94
     */
95
    public function getTimeout()
96
    {
97
        return $this->timeout;
98
    }
99
100
    /**
101
     * @return int
102
     */
103
    public function getMaxRetries()
104
    {
105
        return $this->maxRetries;
106
    }
107
108
    /**
109
     * @param int $maxRetries
110
     */
111
    public function setMaxRetries($maxRetries)
112
    {
113
        $this->maxRetries = $maxRetries;
114
    }
115
}
116