apache / apache/netbeans

[PHP] Implement full PSR/PER code style and use by default

Open
#4,685 12 comments 1 reaction 1 assignee Claimed by @junichi11 View on GitHub
kind:feature PHP
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### 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).~~
Impemented in #6467.
```php

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.