| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Pair |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var bool|float|int|string |
||
| 11 | */ |
||
| 12 | private $key; |
||
|
|
|||
| 13 | |||
| 14 | /** |
||
| 15 | * @var mixed |
||
| 16 | */ |
||
| 17 | private $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param scalar $key |
||
| 21 | * @param mixed $value |
||
| 22 | */ |
||
| 23 | 50 | public function __construct($key, $value) |
|
| 24 | { |
||
| 25 | 50 | assertScalar($key, "Key must be a scalar."); |
|
| 26 | 49 | $this->key = $key; |
|
| 27 | 49 | $this->value = $value; |
|
| 28 | 49 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return scalar |
||
| 32 | */ |
||
| 33 | 49 | public function getKey() |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | 49 | public function getValue() |
|
| 46 |