CharData   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 8
c 1
b 0
f 0
dl 0
loc 20
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isEof() 0 2 1
A __construct() 0 3 1
A getString() 0 2 1
A length() 0 2 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