Total Complexity | 8 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | final class NodeValueFactory implements NodeValueFactoryInterface |
||
16 | { |
||
17 | |||
18 | private $valueIteratorFactory; |
||
19 | |||
20 | 31 | public static function create(): NodeValueFactoryInterface |
|
21 | { |
||
22 | 31 | return new self(new ValueIteratorFactory); |
|
23 | } |
||
24 | |||
25 | 31 | public function __construct(ValueIteratorFactoryInterface $valueIteratorFactory) |
|
28 | 31 | } |
|
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | * |
||
33 | * @param array|bool|float|int|stdClass|string|null $data |
||
34 | * @param PathInterface|null $path |
||
35 | * @return NodeValueInterface |
||
36 | */ |
||
37 | 31 | public function createValue($data, ?PathInterface $path = null): NodeValueInterface |
|
57 |