Passed
Push — master ( 500a63...c8d25d )
by Glynn
03:58 queued 01:28
created

JsonSelector::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Pixie\JSON;
4
5
class JsonSelector
6
{
7
    /**
8
     * The table column
9
     *
10
     * @var string
11
     */
12
    protected $column;
13
14
    /**
15
     * JSON Nodes
16
     *
17
     * @var string[]
18
     */
19
    protected $nodes;
20
21
    /**
22
     * @param string $column
23
     * @param string[] $nodes
24
     */
25
    public function __construct(string $column, array $nodes)
26
    {
27
        $this->column = $column;
28
        $this->nodes = $nodes;
29
    }
30
31
    /**
32
     * Get the table column
33
     *
34
     * @return string
35
     */
36
    public function getColumn(): string
37
    {
38
        return $this->column;
39
    }
40
41
    /**
42
     * Get jSON Nodes
43
     *
44
     * @return string[]
45
     */
46
    public function getNodes(): array
47
    {
48
        return $this->nodes;
49
    }
50
}
51