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
The following code works as expected with no errors.
(static function (): void { $container = require 'config/container.php'; })();
But if I add an assert() inside the function I get an error.
(static function (): void { $container = require 'config/container.php'; assert($container instanceof ContainerInterface); })();
FILE: public/index.php ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 18 | ERROR | [x] Parentheses around expression "static function (): void { | | $container = require 'config/container.php'; | | assert($container instanceof ContainerInterface); | | }" are redundant ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
fix: Redundant Parentheses - closure with instanceof
397f0a8
Closes #199
fix: Redundant Parentheses - closure with instanceof (#200)
710f71a
Successfully merging a pull request may close this issue.
The following code works as expected with no errors.
But if I add an assert() inside the function I get an error.
The text was updated successfully, but these errors were encountered: