| 1 | <?php |
||
| 14 | final class ScalarToNodeConverter implements ScalarToNodeConverterInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | private $typeMapping = [ |
||
| 20 | 'boolean' => BoolNode::class, |
||
| 21 | 'double' => FloatNode::class, |
||
| 22 | 'integer' => IntNode::class, |
||
| 23 | 'string' => StringNode::class, |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param bool|float|int|null|string $value |
||
| 28 | * @param string $path |
||
| 29 | * |
||
| 30 | * @return AbstractNode |
||
| 31 | * |
||
| 32 | * @throws \InvalidArgumentException |
||
| 33 | */ |
||
| 34 | 6 | public function convert($value, string $path = ''): AbstractNode |
|
| 52 | } |
||
| 53 |