Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae46cfb

Browse files
committed
merged branch gimler/cleamup_yaml (PR symfony#7264)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes symfony#7264). Commits ------- edda254 remove dead code in yaml component Discussion ---------- remove dead code in yaml component | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Cleanup unused code. --------------------------------------------------------------------------- by fabpot at 2013-03-06T16:27:57Z Can you explain why it is not needed anymore? --------------------------------------------------------------------------- by igorw at 2013-03-06T16:44:30Z `$subject` is no longer used anywhere. The `substr` is now done inline in the `preg_match` call. This code is effectively dead.
2 parents 22c1aa3 + 9d88495 commit ae46cfb

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Symfony/Component/Yaml/Inline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,6 @@ public static function parseScalar($scalar, $delimiters = null, $stringDelimiter
235235
*/
236236
private static function parseQuotedScalar($scalar, &$i)
237237
{
238-
// Only check the current item we're dealing with (for sequences)
239-
$subject = substr($scalar, $i);
240-
$items = preg_split('/[\'"]\s*(?:[,:]|[}\]]\s*,)/', $subject);
241-
$subject = substr($subject, 0, strlen($items[0]) + 1);
242-
243238
if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) {
244239
throw new ParseException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i)));
245240
}

0 commit comments

Comments
 (0)