Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
slaFFik opened this issue Mar 2, 2024 · 1 comment
Open

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

slaFFik opened this issue Mar 2, 2024 · 1 comment
Labels

Comments

@slaFFik
Copy link
Member

slaFFik commented Mar 2, 2024

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
@jrfoell
Copy link

jrfoell commented Mar 5, 2024

OK to to work on this when we have time - not high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants