This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
<?php class foo { public $bar = <<<'EOT' bar EOT; } ?> <?php class foo { const ABC = <<<'EOT' bar EOT; } ?> Try to format these snippets. Result: <?php class foo { public $bar = <<<'EOT' bar EOT; } ?>
*** Bug 255592 has been marked as a duplicate of this bug. ***
This seems to be quite complicated and too risky for NB 8.2. The problem seems to be (at least to me) that PHP_HEREDOC_TAG_END contains properly only the label (the closing identifier) whereas PHP_NOWDOC_TAG_END contains also ";" and possible new line. This 2 characters cause that condition [1] in TokenFormatter.scan(ASTNode) is not met (or perhaps the node.getEndOffset() is incorrect, I am not sure). Thanks. [1] ts.offset() + ts.token().length()) <= node.getEndOffset()