Completed
Branch feature/pre-split (c69968)
by Anton
21:25
created

OutputNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResult() 0 4 1
A __destruct() 0 5 1
1
<?php
2
/**
3
 * components
4
 *
5
 * @author    Wolfy-J
6
 */
7
namespace Spiral\ORM\Entities\Nodes;
8
9
/**
10
 * Provides ability to fetch node context.
11
 */
12
abstract class OutputNode extends AbstractNode
13
{
14
    /**
15
     * Array used to aggregate all nested node results in a form of tree.
16
     *
17
     * @var array
18
     */
19
    protected $result = [];
20
21
    /**
22
     * Get resulted tree.
23
     *
24
     * @return array
25
     */
26
    public function getResult(): array
27
    {
28
        return $this->result;
29
    }
30
31
    /**
32
     * Destructing.
33
     */
34
    public function __destruct()
35
    {
36
        $this->result = [];
37
        parent::__destruct();
38
    }
39
}