Passed
Push — master ( 4c4023...2b0e92 )
by Julito
07:08
created

AccessUrlRelCourse::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Chamilo\CoreBundle\Traits\CourseTrait;
10
use Doctrine\ORM\Mapping as ORM;
11
12
/**
13
 * AccessUrlRelCourse.
14
 *
15
 * @ORM\Table(name="access_url_rel_course")
16
 * @ORM\Entity
17
 */
18
class AccessUrlRelCourse
19
{
20
    use CourseTrait;
21
22
    /**
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue()
26
     */
27
    protected int $id;
28
29
    /**
30
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="urls", cascade={"persist"})
31
     * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
32
     */
33
    protected Course $course;
34
35
    /**
36
     * @ORM\ManyToOne(targetEntity="AccessUrl", inversedBy="courses", cascade={"persist"})
37
     * @ORM\JoinColumn(name="access_url_id", referencedColumnName="id")
38
     */
39
    protected AccessUrl $url;
40
41
    /**
42
     * @return string
43
     */
44
    public function __toString()
45
    {
46
        return '-';
47
    }
48
49
    /**
50
     * Get id.
51
     *
52
     * @return int
53
     */
54
    public function getId()
55
    {
56
        return $this->id;
57
    }
58
59
    public function setUrl(AccessUrl $url): self
60
    {
61
        $this->url = $url;
62
63
        return $this;
64
    }
65
66
    public function getUrl(): AccessUrl
67
    {
68
        return $this->url;
69
    }
70
71
    public function getCourse(): Course
72
    {
73
        return $this->course;
74
    }
75
}
76