Skip to content

$this->define() method is treated as define() function #47

@slaFFik

Description

@slaFFik

Expected Behavior

I think the code should differentiate between a class method and a global function.
This may happen with other methods as well that share the same name as a global native PHP function.

Current Behavior

I faced this case:

$this->define( 'SOME_CONSTANT', $this->some_value );

wpforms-phpcs reports this error:

WPForms.Comments.PHPDocDefine.MissPHPDoc: Add the PHPDoc for the define function.

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions