Completed
Pull Request — master (#10)
by Tomáš
04:50 queued 01:55
created

Permalink   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A relativeFilePath() 0 4 1
A relativeUrlPath() 0 4 1
1
<?php
2
3
/*
4
 * This file is a part of Sculpin.
5
 *
6
 * (c) Dragonfly Development Inc.
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Symplify\PHP7_Sculpin\Permalink;
13
14
final class Permalink
15
{
16
    /**
17
     * @var string
18
     */
19
    private $relativeFilePath;
20
21
    /**
22
     * @var string
23
     */
24
    private $relativeUrlPath;
25
26 5
    public function __construct(string $relativeFilePath, string $relativeUrlPath)
27
    {
28 5
        $this->relativeFilePath = $relativeFilePath;
29 5
        $this->relativeUrlPath = $relativeUrlPath;
30 5
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35 1
    public function relativeFilePath() : string
36
    {
37 1
        return $this->relativeFilePath;
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function relativeUrlPath() : string
44
    {
45
        return $this->relativeUrlPath;
46
    }
47
}
48