Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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