- Issue created by @ragnarkurm
Drupal.Functions.MultiLineFunctionDeclaration generates broken code.
1. Create a code file a.php
:
<?php
function a(
): void {
}
2. Run the phpcbf
:
phpcbf --standard=Drupal --sniffs=Drupal.Functions.MultiLineFunctionDeclaration ./a.php
3. Observe the resulting file:
<?php
function a(
,
): void {
}
Don't add comma(s) if a function contains no arguments.
Active
8.3
Coder Sniffer