| Total Complexity | 8 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class Entry implements Value |
||
| 16 | { |
||
| 17 | /** @var StringScalar|IntegerScalar|ConstantFetch|ClassConstantFetch|null */ |
||
| 18 | private $key; |
||
| 19 | |||
| 20 | /** @var ValuableNode */ |
||
| 21 | private $value; |
||
| 22 | |||
| 23 | public function __construct(?Value $key, ValuableNode $value) |
||
| 24 | { |
||
| 25 | assert( |
||
| 26 | $key === null |
||
| 27 | || $key instanceof StringScalar |
||
| 28 | || $key instanceof IntegerScalar |
||
| 29 | || $key instanceof ConstantFetch |
||
| 30 | || $key instanceof ClassConstantFetch |
||
| 31 | ); |
||
| 32 | |||
| 33 | $this->key = $key; |
||
| 34 | $this->value = $value; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return ClassConstantFetch|ConstantFetch|IntegerScalar|StringScalar|null |
||
| 39 | */ |
||
| 40 | public function getKey() : ?Value |
||
| 41 | { |
||
| 42 | return $this->key; |
||
|
|
|||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return ValuableNode |
||
| 47 | */ |
||
| 48 | public function getValue() : ValuableNode |
||
| 51 | } |
||
| 52 | |||
| 53 | public function dispatch(Visitor $visitor) : void |
||
| 56 | } |
||
| 57 | } |
||
| 58 |