Closed farhadsakhaei closed 5 months ago
Yes, the sniff reports this :)
@kukulich Thank you for creating this great standard, If I remove the paranteces, I get another error: Parentheses must be used when instantiating a new class PHPCS (PSR12.Classes.ClassInstantiation.MissingParentheses)
You have to fix your PHPCS configuration. You have enabled sniffs that report incompatible errors.
@kukulich OK, I add PSR12.Classes.ClassInstantiation.MissingParentheses in the exclude rules, Thank you
@kukulich Sorry, I got another error: Usage of "new" without parentheses is disallowed. PHPCS(SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses)
Should I exception the SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses for this line? Or this should be improve?
Hi, I got this error: Useless parentheses in "new".PHPCS(SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses)
The code is:
self::$instance = new $class_name();