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

PermissionCategory   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A name() 0 4 1
A loadCategoryItems() 0 4 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