Passed
Push — master ( 445983...d786ab )
by Yannick
39:28
created

CGroupCategoryRelUser   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 82
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 31
c 1
b 0
f 0
dl 0
loc 82
rs 10
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 1 1
A getGroupCategory() 0 3 1
A getId() 0 3 1
A setPopulationType() 0 5 1
A setStatusInCategory() 0 5 1
A setGroupCategory() 0 5 1
A setId() 0 5 1
A getPopulationType() 0 3 1
A getPopulationId() 0 3 1
A getStatusInCategory() 0 3 1
A setPopulationId() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CourseBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CGroupCategoryRelUser
13
 * Relates users to group categories for autogroup functionality.
14
 */
15
#[ORM\Table(name: 'c_group_category_rel_user')]
16
#[ORM\Entity]
17
class CGroupCategoryRelUser
18
{
19
    #[ORM\Id]
20
    #[ORM\Column(type: 'integer')]
21
    protected ?int $id = null;
22
23
    #[ORM\Id]
24
    #[ORM\ManyToOne(targetEntity: CGroupCategory::class)]
25
    #[ORM\JoinColumn(name: 'group_category_id', referencedColumnName: 'iid', nullable: false, onDelete: 'CASCADE')]
26
    protected ?CGroupCategory $groupCategory = null;
27
28
    #[ORM\Column(type: 'smallint', length: 1)]
29
    protected int $populationType;
30
31
    #[ORM\Column(type: 'integer')]
32
    protected int $populationId;
33
34
    #[ORM\Column(type: 'smallint', length: 1)]
35
    protected int $statusInCategory;
36
37
    public function __construct() {}
38
39
    public function getId(): ?int
40
    {
41
        return $this->id;
42
    }
43
44
    public function setId(int $id): self
45
    {
46
        $this->id = $id;
47
48
        return $this;
49
    }
50
51
    public function getGroupCategory(): ?CGroupCategory
52
    {
53
        return $this->groupCategory;
54
    }
55
56
    public function setGroupCategory(?CGroupCategory $groupCategory): self
57
    {
58
        $this->groupCategory = $groupCategory;
59
60
        return $this;
61
    }
62
63
    public function getPopulationType(): int
64
    {
65
        return $this->populationType;
66
    }
67
68
    public function setPopulationType(int $populationType): self
69
    {
70
        $this->populationType = $populationType;
71
72
        return $this;
73
    }
74
75
    public function getPopulationId(): int
76
    {
77
        return $this->populationId;
78
    }
79
80
    public function setPopulationId(int $populationId): self
81
    {
82
        $this->populationId = $populationId;
83
84
        return $this;
85
    }
86
87
    public function getStatusInCategory(): int
88
    {
89
        return $this->statusInCategory;
90
    }
91
92
    public function setStatusInCategory(int $statusInCategory): self
93
    {
94
        $this->statusInCategory = $statusInCategory;
95
96
        return $this;
97
    }
98
}
99