Asset   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 41
ccs 7
cts 8
cp 0.875
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRevision() 0 4 1
A getAssetPath() 0 4 1
A getRelativePath() 0 4 1
A getAbsolutePath() 0 4 1
A getRelativeUrl() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Webrouse\AssetMacro;
5
6
7
class Asset
8
{
9
	/** @var Revision */
10
	private $revision;
11
12
13 1
	public function __construct(Revision $revision)
14
	{
15 1
		$this->revision = $revision;
16 1
	}
17
18
19
	public function getRevision(): Revision
20
	{
21 1
		return $this->revision;
22
	}
23
24
25
	public function getAssetPath(): string
26
	{
27
		return $this->revision->getAssetPath();
28
	}
29
30
31
	public function getRelativePath(): string
32
	{
33 1
		return $this->revision->getRelativePath();
34
	}
35
36
37
	public function getAbsolutePath(): string
38
	{
39 1
		return $this->revision->getAbsolutePath();
40
	}
41
42
43
	public function getRelativeUrl(): string
44
	{
45 1
		return $this->revision->getRelativeUrl();
46
	}
47
}
48