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

@assert_on_string false positive #87

Open
Stadly opened this issue Sep 22, 2023 · 1 comment
Open

@assert_on_string false positive #87

Stadly opened this issue Sep 22, 2023 · 1 comment

Comments

@Stadly
Copy link

Stadly commented Sep 22, 2023

If an assert starts with a string, such as assert('foo' === $bar), PhpDeprecationDetector outputs an error:

Function usage assert() (@assert_on_string) is changed.
You should avoid using string code: 'foo' in assert() usage

By changing to assert($bar === 'foo') no errors are output.

@NathanGibbs3
Copy link
Contributor

NathanGibbs3 commented Nov 23, 2023

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

No branches or pull requests

2 participants