Completed
Push — master ( 1e6e7e...e8cf59 )
by Tim
13:18
created

Questioncategory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 63
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getParent() 0 4 1
A setTitle() 0 4 1
A getTitle() 0 4 1
A setParent() 0 4 1
A getLanguageUid() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
/**
5
 * Questioncategory / Fragen Kategorie.
6
 */
7
8
namespace HDNET\Faq\Domain\Model;
9
10
use HDNET\Autoloader\Annotation\DatabaseField;
11
use HDNET\Autoloader\Annotation\DatabaseTable;
12
13
/**
14
 * Questioncategory / Fragen Kategorie.
15
 *
16
 * @DatabaseTable
17
 */
18
class Questioncategory extends AbstractModel
19
{
20
    /**
21
     * Title.
22
     *
23
     * @var string
24
     * @DatabaseField(type="string")
25
     */
26
    protected $title;
27
28
    /**
29
     * Parent.
30
     *
31
     * @var QuestionCategory
32
     * @DatabaseField(type="int", sql="int(11) DEFAULT '0' NOT NULL")
33
     */
34
    protected $parent;
35
36
    /**
37
     * @var int
38
     */
39
    protected $_languageUid = 0;
40
41
    /**
42
     * Set the title.
43
     */
44
    public function setTitle(string $title): void
45
    {
46
        $this->title = $title;
47
    }
48
49
    /**
50
     * Get the title.
51
     */
52
    public function getTitle(): string
53
    {
54
        return $this->title;
55
    }
56
57
    /**
58
     * Set the parent.
59
     */
60
    public function setParent(self $parent): void
61
    {
62
        $this->parent = $parent;
0 ignored issues
show
Documentation Bug introduced by
It seems like $parent of type object<self> is incompatible with the declared type object<HDNET\Faq\Domain\Model\Questioncategory> of property $parent.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
63
    }
64
65
    /**
66
     * Get the parent.
67
     */
68
    public function getParent(): self
69
    {
70
        return $this->parent;
71
    }
72
73
    /**
74
     * Public getter for the languageUid.
75
     */
76
    public function getLanguageUid(): int
77
    {
78
        return $this->_languageUid;
79
    }
80
}
81