We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to use the PHP8 nullsafe operator but I'm getting an issue from PHP Code Sniffer as ImportDetection.Imports.RequireImports.Symbol.
ImportDetection.Imports.RequireImports.Symbol
So in the context of a class method this is fine:
$this->property;
but I get an issue for this:
$this?->property;
claiming Found unimported symbol 'property'.
Found unimported symbol 'property'.
The same is happening outside of a class method context too, when trying to access a property of an object using the ?-> operator.
?->
This is happening with php_codesniffer v3.6.0 and phpcs-import-detection v1.3.1.
Please let me know if I'm doing something wrong or if you need more info from me!
The text was updated successfully, but these errors were encountered:
Thanks for the report! This is likely happening because the sniff is not aware of the nullsafe operator syntax in php 8. That can be fixed.
Sorry, something went wrong.
I just opened this same bug (squizlabs/PHP_CodeSniffer#3374) on PHP CodeSniffer by mistake. Just linking here for reference.
Thanks. Sorry I haven't had a chance to get to this yet. It's on my list.
No branches or pull requests
I'm trying to use the PHP8 nullsafe operator but I'm getting an issue from PHP Code Sniffer as
ImportDetection.Imports.RequireImports.Symbol
.So in the context of a class method this is fine:
but I get an issue for this:
$this?->property;
claiming
Found unimported symbol 'property'.
The same is happening outside of a class method context too, when trying to access a property of an object using the
?->
operator.This is happening with php_codesniffer v3.6.0 and phpcs-import-detection v1.3.1.
Please let me know if I'm doing something wrong or if you need more info from me!
The text was updated successfully, but these errors were encountered: