Commit 89ee097
committed
Squiz/Heredoc: make sniff more modular
Until now, the sniff would blindly forbid both heredoc and nowdoc syntax.
With the change as proposed in this PR, the sniff still does so, but now uses different error codes for encountered heredocs vs nowdocs, which allows for selectively ignoring one or the other, either from the ruleset or inline.
Includes updating the error message to be more specific for each error code as well.
Fixes squizlabs/PHP_CodeSniffer 23181 parent b63cedf commit 89ee097
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
0 commit comments