Response   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getVersion() 0 3 1
A getFlags() 0 3 1
A getStream() 0 3 1
A getOpcode() 0 3 1
A getBody() 0 3 1
1
<?php
2
namespace Cassandra\Response;
3
use Cassandra\Protocol\Frame;
4
5
class Response implements Frame{
6
	/**
7
	 * @var array
8
	 */
9
	protected $_header;
10
11
	/**
12
	 * @var
13
	 */
14
	protected $_stream;
15
	
16
	/**
17
	 * 
18
	 * @param array $header
19
	 * @param $stream
20
	 */
21
	public function __construct($header, $stream){
22
		$this->_header = $header;
23
		
24
		$this->_stream = $stream;
25
	}
26
	
27
	public function getVersion(){
28
		return $this->_header['version'];
29
	}
30
	
31
	public function getFlags(){
32
		return $this->_header['flags'];
33
	}
34
	
35
	public function getStream(){
36
		return $this->_header['stream'];
37
	}
38
	
39
	public function getOpcode(){
40
		return $this->_header['opcode'];
41
	}
42
	
43
	public function getBody(){
44
		return $this->_stream;
45
	}
46
}
47