RootNode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A pushData() 0 4 1
1
<?php
2
/**
3
 * Spiral, Core Components
4
 *
5
 * @author Wolfy-J
6
 */
7
8
namespace Spiral\ORM\Entities\Nodes;
9
10
use Spiral\ORM\Entities\Nodes\Traits\DuplicateTrait;
11
12
class RootNode extends OutputNode
13
{
14
    use DuplicateTrait;
15
16
    /**
17
     * @param array  $columns
18
     * @param string $primaryKey
19
     */
20
    public function __construct(array $columns = [], string $primaryKey)
21
    {
22
        parent::__construct($columns, null);
23
        $this->primaryKey = $primaryKey;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected function pushData(array &$data)
30
    {
31
        $this->result[] = &$data;
32
    }
33
}