| Total Complexity | 4 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class SingleValueDataSet implements DataSetInterface |
||
| 14 | { |
||
| 15 | 508 | public function __construct(private mixed $value) |
|
| 16 | { |
||
| 17 | } |
||
| 18 | |||
| 19 | 3 | public function getAttributeValue(string $attribute): mixed |
|
| 20 | { |
||
| 21 | 3 | throw new BadMethodCallException('Single value data set does not support attributes.'); |
|
| 22 | } |
||
| 23 | |||
| 24 | 507 | public function getData(): mixed |
|
| 25 | { |
||
| 26 | 507 | return $this->value; |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function hasAttribute(string $attribute): bool |
|
| 32 | } |
||
| 33 | } |
||
| 34 |