Completed
Pull Request — master (#1)
by Adam
05:22 queued 03:01
created

Message   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 53
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A queue() 0 4 1
A handler() 0 4 1
A data() 0 4 1
1
<?php
2
3
namespace Equip\Queue;
4
5
class Message
6
{
7
    /**
8
     * @var string
9
     */
10
    private $queue;
11
12
    /**
13
     * @var string
14
     */
15
    private $handler;
16
17
    /**
18
     * @var array
19
     */
20
    private $data;
21
22
    /**
23
     * @param string $queue
24
     * @param string $handler
25
     * @param array $data
26
     */
27
    public function __construct($queue, $handler, array $data = [])
28
    {
29
        $this->queue = $queue;
30
        $this->handler = $handler;
31
        $this->data = $data;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function queue()
38
    {
39
        return $this->queue;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function handler()
46
    {
47
        return $this->handler;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function data()
54
    {
55
        return $this->data;
56
    }
57
}
58