| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | function atom($val) |
||
| 12 | { |
||
| 13 | if (is_numeric($val)) { |
||
| 14 | return new Scalar(strpos($val, '.') |
||
| 15 | ? (float)$val |
||
| 16 | : (int)$val); |
||
| 17 | } |
||
| 18 | |||
| 19 | if (strpos($val, '"') === 0) { |
||
| 20 | return new Scalar(str_replace('"', '', $val)); |
||
| 21 | } |
||
| 22 | |||
| 23 | if (\is_bool($val)) { |
||
| 24 | return new Scalar($val); |
||
| 25 | } |
||
| 26 | |||
| 27 | return new Symbol($val); |
||
| 28 | } |
||
| 98 |