| @@ 466-470 (lines=5) @@ | ||
| 463 | $scalarLower = strtolower($scalar); |
|
| 464 | ||
| 465 | if (0 === strpos($scalar, '*')) { |
|
| 466 | if (false !== $pos = strpos($scalar, '#')) { |
|
| 467 | $value = substr($scalar, 1, $pos - 2); |
|
| 468 | } else { |
|
| 469 | $value = substr($scalar, 1); |
|
| 470 | } |
|
| 471 | ||
| 472 | // an unquoted * |
|
| 473 | if (false === $value || '' === $value) { |
|
| @@ 516-520 (lines=5) @@ | ||
| 513 | private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $context) |
|
| 514 | { |
|
| 515 | if (0 === strpos($value, '*')) { |
|
| 516 | if (false !== $pos = strpos($value, '#')) { |
|
| 517 | $value = substr($value, 1, $pos - 2); |
|
| 518 | } else { |
|
| 519 | $value = substr($value, 1); |
|
| 520 | } |
|
| 521 | ||
| 522 | if (!array_key_exists($value, $this->refs)) { |
|
| 523 | throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); |
|