We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 3.6.7
The PhpParser ignores a comment if it's in the first line of a method. This occurses when using PhpFile::fromCode()
`$code = "<?php
class TestClass { function aFunction() { // a Comment \$foo = 'bar'; // another Comment } }";
$file = PhpFile::fromCode($code); $newCode = (string) $file; echo $newCode; return;`
The first comment should get extracted from the code and stored in the PhpFile object.
The text was updated successfully, but these errors were encountered:
be04723
Extractor: keeps the first comment in the method [Closes #119]
7100868
6436c65
No branches or pull requests
Version: 3.6.7
Bug Description
The PhpParser ignores a comment if it's in the first line of a method. This occurses when using PhpFile::fromCode()
Steps To Reproduce
`$code = "<?php
$file = PhpFile::fromCode($code);
$newCode = (string) $file;
echo $newCode;
return;`
Expected Behavior
The first comment should get extracted from the code and stored in the PhpFile object.
The text was updated successfully, but these errors were encountered: