PageView::setUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Alpha\VisitorTrackingBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Gedmo\Mapping\Annotation as Gedmo;
9
10
/**
11
 * @ORM\Entity
12
 */
13
class PageView
14
{
15
    /**
16
     * @var int
17
     *
18
     * @ORM\Column(type="integer")
19
     * @ORM\Id
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    protected $id;
23
24
    /**
25
     * @var Session
26
     *
27
     * @ORM\ManyToOne(targetEntity="Session", inversedBy="pageViews")
28
     */
29
    protected $session;
30
31
    /**
32
     * @var string
33
     *
34
     * @ORM\Column(type="string")
35
     */
36
    protected $url;
37
38
    /**
39
     * @var \DateTime
40
     *
41
     * @ORM\Column(type="datetime")
42
     * @Gedmo\Timestampable(on="create")
43
     */
44
    protected $created;
45
46
    /**
47
     * @return int
48
     */
49
    public function getId()
50
    {
51
        return $this->id;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getUrl()
58
    {
59
        return $this->url;
60
    }
61
62
    /**
63
     * @param string $url
64
     *
65
     * @return $this
66
     */
67
    public function setUrl($url)
68
    {
69
        $this->url = $url;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @return \DateTime
76
     */
77
    public function getCreated()
78
    {
79
        return $this->created;
80
    }
81
82
    /**
83
     * @param \DateTime $created
84
     *
85
     * @return $this
86
     */
87
    public function setCreated($created)
88
    {
89
        $this->created = $created;
90
91
        return $this;
92
    }
93
94
    /**
95
     * @return Session
96
     */
97
    public function getSession()
98
    {
99
        return $this->session;
100
    }
101
102
    /**
103
     * @return $this
104
     */
105
    public function setSession(Session $session)
106
    {
107
        $this->session = $session;
108
109
        return $this;
110
    }
111
}
112