1 | <?php |
||
31 | class IconvEncodingSniff extends AbstractFunctionCallParameterSniff |
||
32 | { |
||
33 | |||
34 | /** |
||
35 | * Functions to check for. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $targetFunctions = array( |
||
40 | 'iconv_set_encoding' => true, |
||
41 | ); |
||
42 | |||
43 | |||
44 | /** |
||
45 | * Do a version check to determine if this sniff needs to run at all. |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | protected function bowOutEarly() |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Process the parameters of a matched function. |
||
57 | * |
||
58 | * @param \PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
59 | * @param int $stackPtr The position of the current token in the stack. |
||
60 | * @param string $functionName The token content (function name) which was matched. |
||
61 | * @param array $parameters Array with information about the parameters. |
||
62 | * |
||
63 | * @return int|void Integer stack pointer to skip forward or void to continue |
||
64 | * normal file processing. |
||
65 | */ |
||
66 | public function processParameters(\PHP_CodeSniffer_File $phpcsFile, $stackPtr, $functionName, $parameters) |
||
79 | }//end class |
||
80 |