PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

How to format attributes

Open momala454 opened this issue 3 years ago • 3 comments

Describe the bug Let's say I have this

#[OA\Post(path: '/users/register', description: 'Create an user account')]

How do I make it like this

#[OA\Post(
    path: '/users/register',
    description: 'Create an user account'
)]

PSR2.Methods.FunctionCallSignature or PEAR.Functions.FunctionCallSignature with allowMultipleArguments to false doesn't seem to work

Versions (please complete the following information):

  • OS: windows 10
  • PHP: 8.1
  • PHPCS: 3.7.1
  • Standard: psr12

momala454 avatar Sep 05 '22 09:09 momala454

I have searched a rule to allow multi attributes but have not found yet. FunctionCallSignature should avoid analyse attributes.

remy-theroux avatar Oct 17 '22 13:10 remy-theroux

https://github.com/slevomat/coding-standard/releases/tag/8.6.0 seems to have some sniffs available in the latest release.

mmoll avatar Oct 17 '22 13:10 mmoll

I will have a look thx

remy-theroux avatar Oct 17 '22 14:10 remy-theroux