phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

PER Coding Style 2.0 Support

Open trollfalgar opened this issue 1 year ago • 4 comments

In addition to code styles: "PSR-12", "PSR-2", "Allman", "K&R", "Laravel", "Drupal", or "WordPress", is there support for the new PER code style present in PHPFig?

Or, maybe would be possible to have this style configuration (4.4)?

image

trollfalgar avatar Jun 07 '23 21:06 trollfalgar

Any change this be implemented soon?

trollfalgar avatar Feb 05 '24 17:02 trollfalgar

Yes, we're working on this one.

Are there any other rules except compacting {} of empty methods/functions that we should make sure to take a look at?

Thank you

Miloslav avatar Feb 05 '24 17:02 Miloslav

Yes, we're working on this one.

Are there any other rules except compacting {} of empty methods/functions that we should make sure to take a look at?

Thank you

I'm using Laravel Pint that is basically a wrapper over PHP-CS-Fixer, with PER profile (with some minor twiks to my need). And the rule single_line_empty_body is the only one missing for me right now.

trollfalgar avatar Feb 05 '24 18:02 trollfalgar

One small detail... some rules specified by PER Coding Style are present as PREMIUM features. For exemple, automatically add comma on the last array element or functions/methods last parameter.

So if by any chance we receive a PER profile, you will need (or not), change this.

trollfalgar avatar Feb 05 '24 18:02 trollfalgar