Category   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getChildren() 0 4 1
A getParentCategory() 0 4 1
A hasParentCategory() 0 4 1
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