Completed
Pull Request — master (#293)
by
unknown
02:49
created

CurrieResource   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 31
ccs 0
cts 15
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getHref() 0 4 1
A getKey() 0 4 1
1
<?php
2
3
namespace League\Fractal\Hal;
4
5
use League\Fractal\Helper\Validator;
6
7
class CurrieResource
8
{
9
    private $key;
10
11
    private $href;
12
13
    public function __construct($key, $href)
14
    {
15
        Validator::validateParamString('key', $key);
16
        Validator::validateParamString('href', $href);
17
18
        $this->key = $key;
19
        $this->href = $href;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getHref()
26
    {
27
        return $this->href;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getKey()
34
    {
35
        return $this->key;
36
    }
37
}
38