| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class KeyValueNode extends ValueNode implements KeyValueNodeInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var mixed |
||
| 16 | */ |
||
| 17 | private $key; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * KeyValueNode constructor. |
||
| 21 | * |
||
| 22 | * @param mixed|null $key |
||
| 23 | * @param mixed|null $value |
||
| 24 | */ |
||
| 25 | 5 | public function __construct( |
|
| 26 | $key, |
||
| 27 | $value, |
||
| 28 | int $capacity = 0, |
||
| 29 | ?TraverserInterface $traverser = null, |
||
| 30 | ?NodeInterface $parent = null |
||
| 31 | ) { |
||
| 32 | 5 | parent::__construct($value, $capacity, $traverser, $parent); |
|
| 33 | |||
| 34 | 5 | $this->key = $key; |
|
| 35 | 5 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 2 | public function getKey() |
|
| 43 | } |
||
| 44 | } |
||
| 45 |