CategoryListItem   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 36
wmc 3
lcom 0
cbo 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A getName() 0 4 1
1
<?php
2
/**
3
 * (c) Tomasz Kunicki <[email protected]>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
namespace Domain\Category\UseCase\ListCategory;
9
10
/**
11
 * Class CategoryListItem
12
 *
13
 * @package Domain\Category\UseCase\ListCategory
14
 */
15
class CategoryListItem
16
{
17
    /** @var integer */
18
    private $id;
19
20
    /** @var  string */
21
    private $name;
22
23
    /**
24
     * CategoryListItem constructor.
25
     *
26
     * @param int $id
27
     * @param string $name
28
     */
29
    public function __construct($id, $name)
30
    {
31
        $this->id = $id;
32
        $this->name = $name;
33
    }
34
35
    /**
36
     * @return int
37
     */
38
    public function getId()
39
    {
40
        return $this->id;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getName()
47
    {
48
        return $this->name;
49
    }
50
}