1 | <?php |
||
25 | * @package PHP_CodeSniffer |
||
26 | * @author Alexander Obuhovich <[email protected]> |
||
27 | * @license https://github.com/aik099/CodingStandard/blob/master/LICENSE BSD 3-Clause |
||
28 | * @link https://github.com/aik099/CodingStandard |
||
29 | */ |
||
30 | class CommaSpacingSniff implements Sniff |
||
31 | { |
||
32 | |||
33 | |||
34 | /** |
||
35 | * Returns an array of tokens this test wants to listen for. |
||
36 | * |
||
37 | * @return array |
||
38 | */ |
||
39 | 1 | public function register() |
|
43 | |||
44 | |||
45 | /** |
||
46 | * Processes this test, when one of its tokens is encountered. |
||
47 | * |
||
48 | * @param File $phpcsFile The file being scanned. |
||
49 | * @param int $stackPtr The position of the current token in the |
||
50 | * stack passed in $tokens. |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | 1 | public function process(File $phpcsFile, $stackPtr) |
|
59 | |||
60 | /** |
||
61 | * Checks spacing before comma. |
||
62 | * |
||
63 | * @param File $phpcsFile The file being scanned. |
||
64 | * @param int $stackPtr The position of the current token |
||
65 | * in the stack passed in $tokens. |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | 1 | public function checkContentBefore(File $phpcsFile, $stackPtr) |
|
86 | |||
87 | /** |
||
88 | * Checks spacing after comma. |
||
89 | * |
||
90 | * @param File $phpcsFile The file being scanned. |
||
91 | * @param int $stackPtr The position of the current token |
||
92 | * in the stack passed in $tokens. |
||
93 | * |
||
94 | * @return void |
||
95 | */ |
||
96 | 1 | public function checkContentAfter(File $phpcsFile, $stackPtr) |
|
131 | }//end class |
||
132 |