Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PHP 5.6+ supports ...$arg for variable number of arguments. However, code sniffer is parsing it incorrectly, for example:
/**
* Docblock
* @param string ...$var
*/
Is getting parsed as type string ...
and var $var
, rather than string
and var ...$var
. This results in an errors Parameter type "string ..." must not contain spaces
and Expected 1 spaces after parameter type; 0 found
.
Comments
Comment #2
klausiI think this was fixed in #2878783: Add support of variadic type hinting and argument specification, let me know if you still see a problem!