AMQPMessage::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Ajir\RabbitMqSqlBundle\DataStructure\Message;
4
5
use JMS\Serializer\Annotation\Type;
6
7
/**
8
 * Default AMQPMessage object
9
 *
10
 * You can implement yours to fit to your message content structure (don't forget to implements AMQPMessageInterface)
11
 *
12
 * @author Florian Ajir <[email protected]>
13
 */
14
class AMQPMessage implements AMQPMessageInterface
15
{
16
    /**
17
     * @var string
18
     * @Type("string")
19
     */
20
    protected $id;
21
22
    /**
23
     * @var string
24
     * @Type("string")
25
     */
26
    protected $index;
27
28
    /**
29
     * @var string
30
     * @Type("string")
31
     */
32
    protected $type;
33
34
    /**
35
     * @var string
36
     * @Type("string")
37
     */
38
    protected $data;
39
40
    /**
41
     * {@inheritDoc}
42
     */
43 1
    public function setId($id)
44
    {
45 1
        $this->id = $id;
46 1
        return $this;
47
    }
48
49
    /**
50
     * {@inheritDoc}
51
     */
52 1
    public function getId()
53
    {
54 1
        return $this->id;
55
    }
56
57
    /**
58
     * {@inheritDoc}
59
     */
60 1
    public function setIndex($index)
61
    {
62 1
        $this->index = $index;
63 1
        return $this;
64
    }
65
66
    /**
67
     * {@inheritDoc}
68
     */
69 1
    public function getIndex()
70
    {
71 1
        return $this->index;
72
    }
73
74
    /**
75
     * {@inheritDoc}
76
     */
77 5
    public function setType($type)
78
    {
79 5
        $this->type = $type;
80 5
        return $this;
81
    }
82
83
    /**
84
     * {@inheritDoc}
85
     */
86 5
    public function getType()
87
    {
88 5
        return $this->type;
89
    }
90
91
    /**
92
     * {@inheritDoc}
93
     */
94 5
    public function setData($data)
95
    {
96 5
        $this->data = $data;
97 5
        return $this;
98
    }
99
100
    /**
101
     * {@inheritDoc}
102
     */
103 5
    public function getData()
104
    {
105 5
        return $this->data;
106
    }
107
}
108