Request::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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
}