| @@ 96-114 (lines=19) @@ | ||
| 93 | * |
|
| 94 | * @return void |
|
| 95 | */ |
|
| 96 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
| 97 | { |
|
| 98 | $algo = $this->getHashAlgorithmParameter($phpcsFile, $stackPtr); |
|
| 99 | if (empty($algo) || is_string($algo) === false) { |
|
| 100 | return; |
|
| 101 | } |
|
| 102 | ||
| 103 | // Bow out if not one of the algorithms we're targetting. |
|
| 104 | if (isset($this->newAlgorithms[$algo]) === false) { |
|
| 105 | return; |
|
| 106 | } |
|
| 107 | ||
| 108 | // Check if the algorithm used is new. |
|
| 109 | $itemInfo = array( |
|
| 110 | 'name' => $algo, |
|
| 111 | ); |
|
| 112 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
| 113 | ||
| 114 | }//end process() |
|
| 115 | ||
| 116 | ||
| 117 | /** |
|
| @@ 66-83 (lines=18) @@ | ||
| 63 | * |
|
| 64 | * @return void |
|
| 65 | */ |
|
| 66 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
| 67 | { |
|
| 68 | $algo = $this->getHashAlgorithmParameter($phpcsFile, $stackPtr); |
|
| 69 | if (empty($algo) || is_string($algo) === false) { |
|
| 70 | return; |
|
| 71 | } |
|
| 72 | ||
| 73 | // Bow out if not one of the algorithms we're targetting. |
|
| 74 | if (isset($this->removedAlgorithms[$algo]) === false) { |
|
| 75 | return; |
|
| 76 | } |
|
| 77 | ||
| 78 | $itemInfo = array( |
|
| 79 | 'name' => $algo, |
|
| 80 | ); |
|
| 81 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
| 82 | ||
| 83 | }//end process() |
|
| 84 | ||
| 85 | ||
| 86 | /** |
|