UnusedFunctionParameterSniff
in package
implements
Sniff
Table of Contents
Interfaces
Properties
- $ignoreTypeHints : array<string|int, mixed>
- The list of class type hints which will be ignored.
- $magicMethods : array<string|int, mixed>
- A list of all PHP magic methods with fixed method signatures.
Methods
- process() : void
- Processes this test, when one of its tokens is encountered.
- register() : array<string|int, int|string>
- Returns an array of tokens this test wants to listen for.
Properties
$ignoreTypeHints
The list of class type hints which will be ignored.
public
array<string|int, mixed>
$ignoreTypeHints
= []
$magicMethods
A list of all PHP magic methods with fixed method signatures.
private
array<string|int, mixed>
$magicMethods
= ['__destruct' => true, '__call' => true, '__callstatic' => true, '__get' => true, '__set' => true, '__isset' => true, '__unset' => true, '__sleep' => true, '__wakeup' => true, '__serialize' => true, '__unserialize' => true, '__tostring' => true, '__set_state' => true, '__clone' => true, '__debuginfo' => true]
Note: __construct()
and __invoke()
are excluded on purpose
as their method signature is not fixed.
Methods
process()
Processes this test, when one of its tokens is encountered.
public
process(File $phpcsFile, int $stackPtr) : void
Parameters
- $phpcsFile : File
-
The file being scanned.
- $stackPtr : int
-
The position of the current token in the stack passed in $tokens.
register()
Returns an array of tokens this test wants to listen for.
public
register() : array<string|int, int|string>