Completed
Push — master ( 9e8686...7944fd )
by T
01:42
created

InterfaceOperationUnary::getTarget()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace PHPSemVerChecker\Operation;
4
5
use PhpParser\Node\Stmt\Interface_;
6
use PHPSemVerChecker\Node\Statement\Interface_ as PInterface;
7
8
class InterfaceOperationUnary extends Operation {
9
	/**
10
	 * @var string
11
	 */
12
	protected $file;
13
	/**
14
	 * @var \PhpParser\Node\Stmt\Interface_
15
	 */
16
	protected $interface;
17
18
	/**
19
	 * @param string                          $fileAfter
20
	 * @param \PhpParser\Node\Stmt\Interface_ $interface
21
	 */
22 2
	public function __construct($fileAfter, Interface_ $interface)
23
	{
24 2
		$this->file = $fileAfter;
25 2
		$this->interface = $interface;
26 2
	}
27
28
	/**
29
	 * @return string
30
	 */
31
	public function getLocation()
32
	{
33
		return $this->file;
34
	}
35
36
	/**
37
	 * @return int
38
	 */
39
	public function getLine()
40
	{
41
		return $this->interface->getLine();
42
	}
43
44
	/**
45
	 * @return string
46
	 */
47 2
	public function getTarget()
48
	{
49 2
		return PInterface::getFullyQualifiedName($this->interface);
50
	}
51
}
52