Link::getHref()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Model;
4
5
use JMS\Serializer\Annotation\Expose;
6
use JMS\Serializer\Annotation\Type;
7
8
class Link
9
{
10
    /**
11
     * @param $href
12
     */
13 8
    public function __construct($href)
14
    {
15 8
        $this->href = $href;
16 8
    }
17
18
    /**
19
     * @var string
20
     *
21
     * @Expose()
22
     * @Type("string")
23
     */
24
    protected $href;
25
26
    /**
27
     * @return string
28
     */
29
    public function getHref()
30
    {
31
        return $this->href;
32
    }
33
34
    /**
35
     * @param  string $href
36
     * @return $this
37
     */
38
    public function setHref($href)
39
    {
40
        $this->href = $href;
41
42
        return $this;
43
    }
44
}
45