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

JsonSelector   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 44
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getNodes() 0 3 1
A getColumn() 0 3 1
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