Completed
Push — master ( 736ea4...748881 )
by Mathieu
12:57
created

PermissionCategory::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Charcoal\User\Acl;
4
5
use Charcoal\Translation\TranslationString;
6
7
use Charcoal\Object\Content;
8
use Charcoal\Object\CategoryInterface;
9
use Charcoal\Object\CategoryTrait;
10
11
/**
12
 * User permission category
13
 */
14
class PermissionCategory extends Content implements CategoryInterface
15
{
16
    use CategoryTrait;
17
18
    /**
19
     * @var TranslationString $name
20
     */
21
    private $name;
22
23
    /**
24
     * @param mixed $name The news category name (localized).
25
     * @return NewsCategory Chainable
26
     */
27
    public function setName($name)
28
    {
29
        $this->name = new TranslationString($name);
30
        return $this;
31
    }
32
33
    /**
34
     * @return TranslationString
35
     */
36
    public function name()
37
    {
38
        return $this->name;
39
    }
40
41
    /**
42
     * @return array
43
     */
44
    public function loadCategoryItems()
45
    {
46
        return [];
47
    }
48
}
49