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

False-positive: string cast #1959

Open
sneakyvv opened this issue Oct 18, 2024 · 1 comment
Open

False-positive: string cast #1959

sneakyvv opened this issue Oct 18, 2024 · 1 comment

Comments

@sneakyvv
Copy link

Subject Details
Plugin Php Inspections (EA Extended)
Language level PHP 8.1

Current behaviour

image
image
image

Expected behaviour

Should not mark the (first) cast as unnecessary. (The second cast is there because of Psalm config)

Environment details

Windows 11, PhpStorm 2024.2.3

@sneakyvv
Copy link
Author

sneakyvv commented Oct 18, 2024

I just noted that this does work properly.

image

Is it a bug then? Or is it because php will cast for us? Even when strict_types=1?

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

1 participant