AMQP   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBody() 0 4 1
A getObject() 0 4 1
1
<?php
2
3
namespace Aimeos\MW\MQueue\Message;
4
5
6
class AMQP implements Iface
7
{
8
	private $msg;
9
10
11
	/**
12
	 * Initializes the message object
13
	 *
14
	 * @param \PhpAmqpLib\Message\AMQPMessage $msg AMQPMessage object
15
	 */
16
	public function __construct( \PhpAmqpLib\Message\AMQPMessage $msg )
17
	{
18
		$this->msg = $msg;
19
	}
20
21
22
	/**
23
	 * Returns the message body
24
	 *
25
	 * @return string Message body
26
	 */
27
	public function getBody()
28
	{
29
		return $this->msg->getBody();
30
	}
31
32
33
	/**
34
	 * Returns the original message object
35
	 *
36
	 * @return \PhpAmqpLib\Message\AMQPMessage AMQPMessage object
37
	 */
38
	public function getObject()
39
	{
40
		return $this->msg;
41
	}
42
}