Total Complexity | 4 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | final class ObjectWithDynamicDataSet implements DataSetInterface |
||
12 | { |
||
13 | public function __construct(private string $name) |
||
14 | { |
||
15 | } |
||
16 | |||
17 | public function getAttributeValue(string $attribute): mixed |
||
18 | { |
||
19 | return $this->getData()[$attribute] ?? null; |
||
20 | } |
||
21 | |||
22 | public function getData(): ?array |
||
23 | { |
||
24 | return ['name' => $this->name]; |
||
25 | } |
||
26 | |||
27 | public function hasAttribute(string $attribute): bool |
||
30 | } |
||
31 | } |
||
32 |