Skip to content

False positives of UnusedVariable in fn() functions #346

Closed
@ghnp5

Description

@ghnp5

Hello,

Since the last version (or some earlier, but recently), I keep getting false positives of VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable in arrow functions.

Example:

$ignoredDirs = array_map(fn($dir) => PREFIX_DIR.$dir, PHP_ERROR_LOGS['ignore_dirs']);

It says that $dir is unused.

It happens for all arrow functions, seems, and for all parameters of those functions.

Using PHP 8.3, on Windows.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions