zeleznypa opened a new issue, #8246: URL: https://github.com/apache/netbeans/issues/8246
### Apache NetBeans version Apache NetBeans 24 ### What happened As part of ensuring application code quality compliance, there is a metric in Netbeans that one method should ideally not exceed 20 lines of application code. If the code is annotated using phpDoc comments, these lines are not properly counted in the total. However, once semantically identical comments are used, but with a tool prefix such as PHPStan or Psalm, these lines are unfortunately counted in the total count, leading to a warning error being reported for the method in question, or for the entire length of the class. Translated with www.DeepL.com/Translator (free version) ### Language / Project Type / NetBeans Component PHP ### How to reproduce Just paste the following code into the new PHP file: ```php <?php declare(strict_types=1); namespace Vendor\Project; class Foo { public function basePhpDoc(): void { /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ /** @var string $foo */ } public function phpstanPhpDoc(): void { /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ /** @phpstan-var string $foo */ } } ``` And see te difference between `basePhpDoc` and `phpstanPhpDoc` methods <img width="1060" alt="Image" src="https://github.com/user-attachments/assets/2a7bb7f7-eb95-4010-9b66-a3048f93ee5e" /> IMHO any lines of PHPDoc should be ignored in lines count ### Did this work correctly in an earlier version? No / Don't know ### Operating System Mac OS X version 15.3.1 running on aarch64; UTF-8; cs_CZ (nb) ### JDK 23.0.1; Java HotSpot(TM) 64-Bit Server VM 23.0.1+11-39 ### Apache NetBeans packaging Apache NetBeans provided installer ### Anything else _No response_ ### Are you willing to submit a pull request? No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists