Configuration::isVerificationMode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
ccs 2
cts 2
cp 1
crap 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatEET;
4
5
class Configuration
6
{
7
8
	/** @var string */
9
	private $vatId;
10
11
	/** @var string */
12
	private $premiseId;
13
14
	/** @var string */
15
	private $cashRegisterId;
16
17
	/** @var bool */
18
	private $verificationMode;
19
20
	/** @var EvidenceMode */
21
	private $evidenceMode;
22
23
	/** @var EvidenceEnvironment */
24
	private $evidenceEnvironment;
25
26 4
	public function __construct(string $vatId, string $premiseId, string $cashRegisterId, EvidenceEnvironment $evidenceEnvironment, bool $verificationMode = false)
27
	{
28 4
		$this->vatId = $vatId;
29 4
		$this->premiseId = $premiseId;
30 4
		$this->cashRegisterId = $cashRegisterId;
31 4
		$this->evidenceMode = EvidenceMode::get(EvidenceMode::REGULAR);
0 ignored issues
show
Documentation Bug introduced by
It seems like \SlevomatEET\EvidenceMod...\EvidenceMode::REGULAR) of type object<self> is incompatible with the declared type object<SlevomatEET\EvidenceMode> of property $evidenceMode.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32 4
		$this->verificationMode = $verificationMode;
33 4
		$this->evidenceEnvironment = $evidenceEnvironment;
34 4
	}
35
36 4
	public function getVatId(): string
37
	{
38 4
		return $this->vatId;
39
	}
40
41 4
	public function getPremiseId(): string
42
	{
43 4
		return $this->premiseId;
44
	}
45
46 4
	public function getCashRegisterId(): string
47
	{
48 4
		return $this->cashRegisterId;
49
	}
50
51 4
	public function isVerificationMode(): bool
52
	{
53 4
		return $this->verificationMode;
54
	}
55
56 4
	public function getEvidenceMode(): EvidenceMode
57
	{
58 4
		return $this->evidenceMode;
59
	}
60
61 1
	public function getEvidenceEnvironment(): EvidenceEnvironment
62
	{
63 1
		return $this->evidenceEnvironment;
64
	}
65
66
}
67