Skip to content

false positive on Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed and compact #3745

Open
@tebeso

Description

@tebeso

Describe the bug
Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed is triggered when variables are used via compact in function

Code sample

public static function insertMessage(int $id, string $language, string $translation): void
{
   Yii::$app->db->createCommand()->insert(
      'message',
      compact('id', 'language', 'translation')
   )->execute();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions