Failed Conditions
Push — master ( 9f23c0...1448ca )
by Adrien
07:45
created

HasUrl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 26
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUrl() 0 3 1
A getUrl() 0 3 1
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