Passed
Pull Request — master (#6127)
by Angel Fernando Quiroz
07:52
created

AccessUrlRelPlugin   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 29
dl 0
loc 73
rs 10
c 1
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setActive() 0 5 1
A getUrl() 0 3 1
A setPlugin() 0 5 1
A getPlugin() 0 3 1
A setConfiguration() 0 5 1
A setUrl() 0 5 1
A isActive() 0 3 1
A getId() 0 3 1
A getConfiguration() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Chamilo\CoreBundle\Repository\AccessUrlRelPluginRepository;
10
use Doctrine\ORM\Mapping as ORM;
11
12
#[ORM\Entity(repositoryClass: AccessUrlRelPluginRepository::class)]
13
class AccessUrlRelPlugin
14
{
15
    #[ORM\Id]
16
    #[ORM\GeneratedValue]
17
    #[ORM\Column]
18
    private ?int $id = null;
19
20
    #[ORM\ManyToOne(inversedBy: 'accessUrlRelPlugins')]
21
    #[ORM\JoinColumn(nullable: false)]
22
    private ?Plugin $plugin = null;
23
24
    #[ORM\ManyToOne(inversedBy: 'plugins')]
25
    #[ORM\JoinColumn(nullable: false)]
26
    private ?AccessUrl $url = null;
27
28
    #[ORM\Column]
29
    private ?bool $active = null;
30
31
    #[ORM\Column(nullable: true)]
32
    private ?array $configuration = null;
33
34
    public function getId(): ?int
35
    {
36
        return $this->id;
37
    }
38
39
    public function getPlugin(): ?Plugin
40
    {
41
        return $this->plugin;
42
    }
43
44
    public function setPlugin(?Plugin $plugin): static
45
    {
46
        $this->plugin = $plugin;
47
48
        return $this;
49
    }
50
51
    public function getUrl(): ?AccessUrl
52
    {
53
        return $this->url;
54
    }
55
56
    public function setUrl(?AccessUrl $url): static
57
    {
58
        $this->url = $url;
59
60
        return $this;
61
    }
62
63
    public function isActive(): ?bool
64
    {
65
        return $this->active;
66
    }
67
68
    public function setActive(bool $active): static
69
    {
70
        $this->active = $active;
71
72
        return $this;
73
    }
74
75
    public function getConfiguration(): ?array
76
    {
77
        return $this->configuration;
78
    }
79
80
    public function setConfiguration(?array $configuration): static
81
    {
82
        $this->configuration = $configuration;
83
84
        return $this;
85
    }
86
}
87