| @@ 445-449 (lines=5) @@ | ||
| 442 | $scalarLower = strtolower($scalar); |
|
| 443 | ||
| 444 | if (0 === strpos($scalar, '*')) { |
|
| 445 | if (false !== $pos = strpos($scalar, '#')) { |
|
| 446 | $value = substr($scalar, 1, $pos - 2); |
|
| 447 | } else { |
|
| 448 | $value = substr($scalar, 1); |
|
| 449 | } |
|
| 450 | ||
| 451 | // an unquoted * |
|
| 452 | if (false === $value || '' === $value) { |
|
| @@ 478-482 (lines=5) @@ | ||
| 475 | private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $context) |
|
| 476 | { |
|
| 477 | if (0 === strpos($value, '*')) { |
|
| 478 | if (false !== $pos = strpos($value, '#')) { |
|
| 479 | $value = substr($value, 1, $pos - 2); |
|
| 480 | } else { |
|
| 481 | $value = substr($value, 1); |
|
| 482 | } |
|
| 483 | ||
| 484 | if (!array_key_exists($value, $this->refs)) { |
|
| 485 | throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLine); |
|