CharData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 3
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace donatj\Printf;
4
5
class CharData {
6
7
	private string $string;
8
	private bool $eof;
9
10 15
	public function __construct( string $string, bool $eof ) {
11 15
		$this->string = $string;
12 15
		$this->eof    = $eof;
13
	}
14
15 15
	public function getString() : string {
16 15
		return $this->string;
17
	}
18
19 15
	public function isEof() : bool {
20 15
		return $this->eof;
21
	}
22
23 15
	public function length() : int {
24 15
		return strlen($this->string);
25
	}
26
27
}
28