Topic   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 129
Duplicated Lines 0 %

Test Coverage

Coverage 86.21%

Importance

Changes 0
Metric Value
wmc 12
dl 0
loc 129
ccs 25
cts 29
cp 0.8621
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
A setImageFilename() 0 3 1
A getStatus() 0 3 1
A setStatus() 0 3 1
A setName() 0 3 1
A setOriginalImageName() 0 3 1
A getImageFilename() 0 3 1
A getOriginalImageName() 0 3 1
A getName() 0 3 1
A setSortKey() 0 3 1
A setId() 0 3 1
A getId() 0 3 1
A getSortKey() 0 3 1
1
<?php
2
3
/* Copyright (C) 2015 Michael Giesler
4
 *
5
 * This file is part of Dembelo.
6
 *
7
 * Dembelo is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * Dembelo is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License 3 for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License 3
18
 * along with Dembelo. If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 * @package DembeloMain
21
 */
22
namespace DembeloMain\Document;
23
24
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
25
use Symfony\Component\Validator\Constraints as Assert;
26
27
/**
28
 * Class Topic
29
 *
30
 * @MongoDB\Document
31
 * @MongoDB\Document(repositoryClass="\DembeloMain\Model\Repository\Doctrine\ODM\TopicRepository")
32
 */
33
class Topic
34
{
35
    public const STATUS_INACTIVE = 0;
36
    public const STATUS_ACTIVE = 1;
37
38
    /**
39
     * @MongoDB\Id
40
     */
41
    protected $id;
42
43
    /**
44
     * @MongoDB\Field(type="string")
45
     */
46
    protected $name;
47
48
    /**
49
     * @MongoDB\Field(type="int")
50
     */
51
    protected $status;
52
53
    /**
54
     * @MongoDB\Field(type="int")
55
     */
56
    protected $sortKey;
57
58
    /**
59
     * @MongoDB\Field(type="string")
60
     */
61
    protected $originalImageName;
62
63
    /**
64
     * @MongoDB\Field(type="string")
65
     */
66
    protected $imageFilename;
67
68
    /**
69
     * @return mixed
70
     */
71 8
    public function getId()
72
    {
73 8
        return $this->id;
74
    }
75
76
    /**
77
     * @param mixed $id
78
     */
79 8
    public function setId($id)
80
    {
81 8
        $this->id = $id;
82 8
    }
83
84
    /**
85
     * @return mixed
86
     */
87 3
    public function getName()
88
    {
89 3
        return $this->name;
90
    }
91
92
    /**
93
     * @param mixed $name
94
     */
95 4
    public function setName($name)
96
    {
97 4
        $this->name = $name;
98 4
    }
99
100
    /**
101
     * @return mixed
102
     */
103 3
    public function getStatus()
104
    {
105 3
        return $this->status;
106
    }
107
108
    /**
109
     * @param mixed $status
110
     */
111 4
    public function setStatus($status)
112
    {
113 4
        $this->status = $status;
114 4
    }
115
116
    /**
117
     * @param int $sortKey
118
     */
119 3
    public function setSortKey($sortKey)
120
    {
121 3
        $this->sortKey = $sortKey;
122 3
    }
123
124
    /**
125
     * @return int
126
     */
127 3
    public function getSortKey()
128
    {
129 3
        return $this->sortKey;
130
    }
131
132
    /**
133
     * @return string
134
     */
135 2
    public function getOriginalImageName()
136
    {
137 2
        return $this->originalImageName;
138
    }
139
140
    /**
141
     * @param string $originalImageName
142
     */
143 2
    public function setOriginalImageName($originalImageName)
144
    {
145 2
        $this->originalImageName = $originalImageName;
146 2
    }
147
148
    /**
149
     * @return string
150
     */
151
    public function getImageFilename()
152
    {
153
        return $this->imageFilename;
154
    }
155
156
    /**
157
     * @param string $imageFilename
158
     */
159
    public function setImageFilename($imageFilename)
160
    {
161
        $this->imageFilename = $imageFilename;
162
    }
163
}
164