1 | <?php |
||
25 | class NewExceptionsFromToStringSniff extends Sniff |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Valid scopes for the __toString() method to live in. |
||
30 | * |
||
31 | * @since 9.2.0 |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | public $ooScopeTokens = array( |
||
36 | 'T_CLASS' => true, |
||
37 | 'T_TRAIT' => true, |
||
38 | 'T_ANON_CLASS' => true, |
||
39 | ); |
||
40 | |||
41 | /** |
||
42 | * Returns an array of tokens this test wants to listen for. |
||
43 | * |
||
44 | * @since 9.2.0 |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public function register() |
||
52 | |||
53 | /** |
||
54 | * Processes this test, when one of its tokens is encountered. |
||
55 | * |
||
56 | * @since 9.2.0 |
||
57 | * |
||
58 | * @param \PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
59 | * @param int $stackPtr The position of the current token |
||
60 | * in the stack passed in $tokens. |
||
61 | * |
||
62 | * @return void |
||
63 | */ |
||
64 | public function process(File $phpcsFile, $stackPtr) |
||
100 | } |
||
101 |