getArgumentName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace Mocktainer;
4
5
class UnmockableConstructorArgumentException extends \Exception
6
{
7
8
	/** @var string */
9
	private $className;
10
11
	/** @var string */
12
	private $argumentName;
13
14
	public function __construct(string $className, string $argumentName)
15
	{
16
		parent::__construct(sprintf(
17
			'Constructor argument "%s" of class %s cannot be mocked',
18
			$argumentName,
19
			$className
20
		));
21
22
		$this->className = $className;
23
		$this->argumentName = $argumentName;
24
	}
25
26
	public function getClassName(): string
27
	{
28
		return $this->className;
29
	}
30
31
	public function getArgumentName(): string
32
	{
33
		return $this->argumentName;
34
	}
35
36
}
37