| Conditions | 2 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function getSHA1($token, $timestamp, $nonce, $encrypt_msg) |
||
| 23 | { |
||
| 24 | //排序 |
||
| 25 | try { |
||
| 26 | $array = [$encrypt_msg, $token, $timestamp, $nonce]; |
||
| 27 | sort($array, SORT_STRING); |
||
| 28 | $str = implode($array); |
||
| 29 | |||
| 30 | return [ErrorCode::$OK, sha1($str)]; |
||
| 31 | } catch (Exception $e) { |
||
| 32 | //print $e . "\n"; |
||
| 33 | return [ErrorCode::$ComputeSignatureError, null]; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.