1 | <?php |
||
18 | class RedundantWhitespaceSniff extends AbstractSniff |
||
19 | { |
||
20 | /** |
||
21 | * The error code. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | public const CODE_ERROR_REDUNDANT_WHITESPACE = 'RedundantWhitespace'; |
||
26 | |||
27 | /** |
||
28 | * The message for the user. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private const MESSAGE_ERROR_REDUNDANT_WHITESPACE = 'Please remove unnecessary whitespace.'; |
||
33 | |||
34 | /** |
||
35 | * Processes the token. |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | protected function processToken(): void |
||
62 | |||
63 | /** |
||
64 | * Registers the tokens that this sniff wants to listen for. |
||
65 | * |
||
66 | * An example return value for a sniff that wants to listen for whitespace |
||
67 | * and any comments would be: |
||
68 | * |
||
69 | * <code> |
||
70 | * return array( |
||
71 | * T_WHITESPACE, |
||
72 | * T_DOC_COMMENT, |
||
73 | * T_COMMENT, |
||
74 | * ); |
||
75 | * </code> |
||
76 | * |
||
77 | * @return int[] |
||
78 | * @see Tokens.php |
||
79 | */ |
||
80 | public function register(): array |
||
84 | } |
||
85 |