Active
Project:
Coder
Version:
8.3.24
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2024 at 10:07 UTC
Updated:
4 Aug 2024 at 10:07 UTC
Jump to comment: Most recent
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.
Comments