You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With PHP 8.0 unexpectedly adding named argument support, renaming parameters to indicate that they're unused turned out to be a mistake for me to suggest (months before learning about that).
'possiblyUnusedParamWithUnusedPrefix' => [
'<?php
class A {
public static function foo(int $unusedArg = null) : void {}
}
A::foo();',
],
Instead, it would be useful to add @unused-param as a modifier - see phan/ProposedAnnotations#1
(e.g. with syntax such as the following)
/**
* @param $x @unused-param
* @param int $y
* @unused-param $y
* @unused-param ...$args
*/
function example(int $x, int $y, ...$args) {}
The text was updated successfully, but these errors were encountered:
With PHP 8.0 unexpectedly adding named argument support, renaming parameters to indicate that they're unused turned out to be a mistake for me to suggest (months before learning about that).
Instead, it would be useful to add
@unused-param
as a modifier - see phan/ProposedAnnotations#1(e.g. with syntax such as the following)
The text was updated successfully, but these errors were encountered: