Closed stramunin closed 1 year ago
Looks good. Can you provide test cases? (I never use heredoc :p)
In old project heredoc
is often used. In one of the projects in which I participate, it is also used. Without this fix, the generated classes (with heredoc) will have a syntax error.
I can write tests later.
I'm wondering, whether the Writer
is a good place to do that, since you tokenize the code. I would rather see this in two steps, keeping the writer as is?
Also please provide test cases. If this all comes down, I'd love to include this in v0.6
.
Don't indent closing indetifier
Heredoc
The closing identifier must begin in the first column of the line.(http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc)