OutputNode::__destruct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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