Closed
Description
A number of sniffs contain a public $error
property to toggle whether the sniff should throw an error
or a warning
.
This property has been superseded by the ability to specify <type>error</type>
for each sniff in a custom ruleset since PHPCS 1.4.1
.
I'd like to suggest removing these public $error
properties from any sniffs which have them and to remove the code within the process()
method of those sniffs handling the toggle.
A quick scan yields the following sniffs for which this applies:
Generic.ControlStructures.InlineControlStructure
Generic.Formatting.MultipleStatementAlignment
Generic.PHP.ForbiddenFunctions
Generic.PHP.NoSilencedErrors
Generic.Strings.UnnecessaryStringConcat
Squiz.CSS.ForbiddenStyles
(sniff will be removed anyway in 4.0.0)Squiz.PHP.DiscouragedFunctions
Squiz.PHP.ForbiddenFunctions
(inherited)
The Customizable Sniff Properties wiki page would also need to be updated for this change.
I'd suggest adding a Removed in
column (where relevant) to the properties table containing the version nr in which a property was removed.
Metadata
Metadata
Assignees
Labels
No labels