Skip to content

Conversation

@weaverryan
Copy link
Member

This helps #460 by fixing a few bugs with YamlSourceManipulator. But, it doesn't yet allow for the access_control array structure to be printed in an inline format (#460 (comment)).

Cheers!

@weaverryan weaverryan added the Bug Bug Fix label Nov 3, 2019
Comment on lines +466 to +469
$isNextContentComment = $this->isPreviousLineComment($newPosition);
if ($isNextContentComment) {
$newPosition++;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be a while in case of multi-line comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $newPosition++ here is just because of the code below that adds 1 new character (\n) if the next line is a comment. I'm moving this pointer/position forward 1 for that 1 \n. It's confusing code :). The test case actually does have 2 lines of comment.

@weaverryan weaverryan closed this in 7102b79 Dec 1, 2019
@weaverryan weaverryan merged commit aa6c358 into symfony:master Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants