terax6669 opened a new issue, #4685: URL: https://github.com/apache/netbeans/issues/4685
### Description Some things that I noticed, but I'm sure there are more: * Formatting rules for PHP should adhere to PSR by default * Formatting rules in the Blank Lines category seem to be impossible to adhere to PSR. Example with traits - according to [PSR](https://www.php-fig.org/psr/psr-12/#42-using-traits) traits should be the first thin inside a class. We have `Before Use Trait` but not `After`. Therefore I must set `Before Function` to 1 to separate traits and functions. Now even if I set `After Class Header` to 0 I will get a blank line when I have a method inside a class but no trait (which would be the most common scenario). ```php <?php class Foo { use Bar; public function foobar() { } } // vs class Foo { // this blank line shouldn't be here! public function foobar() { } } ``` * `Templates/Scripting/PHPClass.php` class opening bracket should be on a new line * Same thing for the `cls` code template and the constructor method inside (it's hidden by the fact that default settings in NetBeans reformat code templates on completion) * Related: #4609 * Related: #4641 ### Use case/motivation PSR is the de facto standard for PHP. There are a few things in PSR that are not available in NetBeans. It would be great to fix those and also **set it as default formatting for PHP files** in the next version! ### Related issues * #4609 * #4641 Probably more, I didn't bother searching. ### Are you willing to submit a pull request? No ### Code of Conduct Yes -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
