Failed Conditions
Push — master ( 9f23c0...1448ca )
by Adrien
07:45
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 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\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)
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