Request   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 35
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getType() 0 3 1
A __toString() 0 3 1
1
<?php
2
namespace evseevnn\Cassandra\Protocol;
3
4
class Request {
5
6
	/**
7
	 * @var string
8
	 */
9
	private $binary;
10
11
	/**
12
	 * @var int
13
	 */
14
	private $type;
15
16
	/**
17
	 * @param int $type OpcodeEnum::* constants
18
	 * @param string $binary
19
	 */
20
	public function __construct($type, $binary = '') {
21
		$this->binary = $binary;
22
		$this->type = $type;
23
	}
24
25
	/**
26
	 * @return int
27
	 */
28
	public function getType() {
29
		return $this->type;
30
	}
31
32
	/**
33
	 * @return string
34
	 */
35
	public function __toString() {
36
		return $this->binary;
37
	}
38
}