1 | <?php |
||
25 | class PHPCompatibility_Sniffs_PHP_RemovedHashAlgorithmsSniff extends PHPCompatibility_AbstractRemovedFeatureSniff |
||
|
|||
26 | { |
||
27 | |||
28 | /** |
||
29 | * A list of removed hash algorithms, which were present in older versions. |
||
30 | * |
||
31 | * The array lists : version number with false (deprecated) and true (removed). |
||
32 | * If's sufficient to list the first version where the hash algorithm was deprecated/removed. |
||
33 | * |
||
34 | * @var array(string => array(string => bool)) |
||
35 | */ |
||
36 | protected $removedAlgorithms = array( |
||
37 | 'salsa10' => array( |
||
38 | '5.4' => true, |
||
39 | ), |
||
40 | 'salsa20' => array( |
||
41 | '5.4' => true, |
||
42 | ), |
||
43 | ); |
||
44 | |||
45 | /** |
||
46 | * Returns an array of tokens this test wants to listen for. |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | public function register() |
||
55 | |||
56 | |||
57 | /** |
||
58 | * Processes this test, when one of its tokens is encountered. |
||
59 | * |
||
60 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
||
61 | * @param int $stackPtr The position of the current token in the |
||
62 | * stack passed in $tokens. |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
84 | |||
85 | |||
86 | /** |
||
87 | * Get the relevant sub-array for a specific item from a multi-dimensional array. |
||
88 | * |
||
89 | * @param array $itemInfo Base information about the item. |
||
90 | * |
||
91 | * @return array Version and other information about the item. |
||
92 | */ |
||
93 | public function getItemArray(array $itemInfo) |
||
97 | |||
98 | |||
99 | /** |
||
100 | * Get the error message template for this sniff. |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | protected function getErrorMsgTemplate() |
||
108 | |||
109 | |||
110 | }//end class |
||
111 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.