Completed
Push — development ( 5025e7...b32421 )
by Torben
04:56
created

Category   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 4
c 3
b 0
f 0
lcom 0
cbo 0
dl 0
loc 61
rs 10
ccs 10
cts 10
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 4 1
A setTitle() 0 4 1
A getParent() 0 4 1
A setParent() 0 4 1
1
<?php
2
namespace DERHANSEN\SfBanners\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
18
19
/**
20
 * Category
21
 *
22
 * @author Torben Hansen <[email protected]>
23
 */
24
class Category extends AbstractEntity
25
{
26
27
    /**
28
     * Title
29
     *
30
     * @var string
31
     * @validate NotEmpty
32
     */
33
    protected $title;
34
35
    /**
36
     * parent
37
     *
38
     * @var \DERHANSEN\SfBanners\Domain\Model\Category
39
     */
40
    protected $parent;
41
42
    /**
43
     * Returns the title
44
     *
45
     * @return string $title
46
     */
47 1
    public function getTitle()
48
    {
49 1
        return $this->title;
50
    }
51
52
    /**
53
     * Sets the title
54
     *
55
     * @param string $title
56
     * @return void
57
     */
58 1
    public function setTitle($title)
59
    {
60 1
        $this->title = $title;
61 1
    }
62
63
    /**
64
     * Returns the parent
65
     *
66
     * @return \DERHANSEN\SfBanners\Domain\Model\Category $parent
67
     */
68 1
    public function getParent()
69
    {
70 1
        return $this->parent;
71
    }
72
73
    /**
74
     * Sets the parent
75
     *
76
     * @param \DERHANSEN\SfBanners\Domain\Model\Category $parent
77
     * @return void
78
     */
79 1
    public function setParent(Category $parent)
80
    {
81 1
        $this->parent = $parent;
82 1
    }
83
84
}
85