Category::getChildren()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * @author Serkin Alexander <[email protected]>
5
 * @license https://github.com/serkin/ymlparser/LICENSE MIT
6
 */
7
8
namespace YMLParser\Node;
9
10
class Category extends \ArrayObject
11
{
12
    /**
13
     * Gets all category's children categories.
14
     *
15
     * @return array Array of YMLParser\Node\Category or empty array
16
     */
17
    public function getChildren()
18
    {
19
        return [];
20
    }
21
22
    /**
23
     * Gets category's parent category.
24
     *
25
     * @return Category|null
26
     */
27
    public function getParentCategory()
28
    {
29
        return new self([]);
30
    }
31
32
    /**
33
     * Checks wether category has parent category or not.
34
     *
35
     * @return bool
36
     */
37
    public function hasParentCategory()
38
    {
39
        return true;
40
    }
41
}
42