| Total Complexity | 17 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class ArrayItemRenderer |
||
| 8 | { |
||
| 9 | public ?string $key; |
||
| 10 | /** @var mixed */ |
||
| 11 | public $value; |
||
| 12 | public bool $wrapValue = true; |
||
| 13 | public bool $wrapKey; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param null|string $key |
||
| 17 | * @param mixed $value |
||
| 18 | * @param bool $wrapKey |
||
| 19 | */ |
||
| 20 | public function __construct(?string $key, $value = null, bool $wrapKey = false) |
||
| 21 | { |
||
| 22 | $this->key = $key; |
||
| 23 | $this->value = $value; |
||
| 24 | $this->wrapKey = $wrapKey; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function __toString() |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param mixed $value |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | private function renderValue($value): string |
||
| 69 | } |
||
| 70 | } |
||
| 71 |