Prepare   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getBody() 0 3 1
1
<?php
2
namespace Cassandra\Request;
3
use Cassandra\Protocol\Frame;
4
5
class Prepare extends Request{
6
7
	protected $opcode = Frame::OPCODE_PREPARE;
8
	
9
	/**
10
	 * 
11
	 * @var string
12
	 */
13
	protected $_cql;
14
	
15
	/**
16
	 * 
17
	 * @param string $cql
18
	 */
19
	public function __construct($cql) {
20
		$this->_cql = $cql;
21
	}
22
	
23
	public function getBody(){
24
		return pack('N', strlen($this->_cql)) . $this->_cql;
25
	}
26
}