driade / phpfmt8

PHP formatter for Sublime Text 4, with PHP 8 support.
BSD 3-Clause "New" or "Revised" License
46 stars 2 forks source link

Issues with formatting of Arrays and Array Access for WordPress Coding Standards #33

Closed nisarul-dev closed 1 year ago

nisarul-dev commented 1 year ago

Issues:

  1. As per WordPress Coding Standard, an array should be defined like this: (space at the beginning and closing of parentheses or square brackets) Screenshot 2023-05-30 at 10 09 59 AM Source: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#declaring-arrays

  2. As per WordPress Coding Standard, spaces while accessing array items will be like this: Screenshot 2023-05-30 at 10 06 16 AM Source: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#space-usage

Please, solve this issue by introducing some configurations regarding "[]" (Square brackets) so that WordPress Developers can write PHP and use the vscode-phpfmt with more ease.

Thank you.

driade commented 1 year ago

Hi, there you're. I've just pushed an initial release for WP which works like PSR2 with the difference you asked for.

I'm going to coordinate with the vscode team for the update to be available, this package is mostly intended to work with Sublime Text.

Thanks!