Failed Conditions
Push — master ( 5e6761...398dce )
by Adrien
04:14 queued 01:57
created

HasUrl::setUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
cc 1
rs 10
ccs 0
cts 3
cp 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\Model\Traits;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * Trait for all objects with an URL
11
 */
12
trait HasUrl
13
{
14
    /**
15
     * @var string
16
     * @ORM\Column(type="string", length=2000, options={"default" = ""})
17
     */
18
    private $url = '';
19
20
    /**
21
     * Set url
22
     *
23
     * @param string $url
24
     */
25
    public function setUrl(string $url): void
26
    {
27
        $this->url = $url;
28
    }
29
30
    /**
31
     * Get url
32
     *
33
     * @return string
34
     */
35
    public function getUrl(): string
36
    {
37
        return $this->url;
38
    }
39
}
40