Global code should be enclosed in global namespace
I have several PHP source files in the following format:
<?php
namespace SomeNamespace {
...
}
?>
PhpStorm displays the errors "Global code Should be enclosed in global namespace declaration" and "No content allowed before namespace declaration" at the last line of these files.
How can I disable this marker?
I already tried several options and found out, that the errors are not displayed in the code Inspection window if I turn of the Option "Annotator" in Settings->Editor->Inspections->General, but the files are still marked as bad in the project explorer and I still see the error marker in the editor.
Deleting the trailing PHP Tag is not an option, because I would have to do that in 1000+ source files.
Any help is appreciated.
Please sign in to leave a comment.
Hi there,
https://youtrack.jetbrains.com/issue/WI-31687 ??
This is exactly my issue.
Thank you very much!