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

InterfaceOperationUnary   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 44
ccs 6
cts 10
cp 0.6
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLocation() 0 4 1
A getLine() 0 4 1
A getTarget() 0 4 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