CreateCategoryRequest::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
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\CreateCategory;
9
10
use Domain\Category\Entity\CategoryInterface;
11
12
/**
13
 * Class CreateCategoryRequest
14
 *
15
 * @package Domain\Category\UseCase\CreateCategory
16
 */
17
class CreateCategoryRequest
18
{
19
    /** @var  string */
20
    private $name;
21
22
    /** @var  CategoryInterface */
23
    private $parent;
24
25
    /**
26
     * CreateCategoryRequest constructor.
27
     *
28
     * @param string $name
29
     * @param CategoryInterface $parent
30
     */
31
    public function __construct($name, CategoryInterface $parent)
32
    {
33
        $this->name = $name;
34
        $this->parent = $parent;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getName()
41
    {
42
        return $this->name;
43
    }
44
45
    /**
46
     * @return CategoryInterface
47
     */
48
    public function getParent()
49
    {
50
        return $this->parent;
51
    }
52
}
53