Passed
Push — master ( 6791f9...01e57e )
by Adam
02:08
created

VirtualPackage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 26
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getPath() 0 4 1
1
<?php
2
/**
3
 * VirtualPackage.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec https://www.ipublikuj.eu
8
 * @package        iPublikuj:Packages!
9
 * @subpackage     Entities
10
 * @since          2.0.0
11
 *
12
 * @date           21.06.16
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\Packages\Entities;
18
19
/**
20
 * Virtual package entity
21
 *
22
 * @package        iPublikuj:Packages!
23
 * @subpackage     Entities
24
 *
25
 * @author         Adam Kadlec <[email protected]>
26
 */
27 1
final class VirtualPackage extends Package
28
{
29
	/**
30
	 * @var string
31
	 */
32
	private $path;
33
34
	/**
35
	 * @param mixed[] $composerData
36
	 * @param string $path
37
	 */
38
	public function __construct(array $composerData, string $path)
39
	{
40 1
		parent::__construct($composerData);
41
42 1
		$this->path = $path;
43 1
	}
44
45
	/**
46
	 * {@inheritdoc}
47
	 */
48
	public function getPath() : string
49
	{
50
		return $this->path;
51
	}
52
}
53