Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 14 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
42 | View Code Duplication | public function getUserList(array $user_list) |
|
|
|||
43 | { |
||
44 | if (!is_array($user_list)) { |
||
45 | $this->setError('参数必须为一个数组'); |
||
46 | |||
47 | return false; |
||
48 | } |
||
49 | |||
50 | $this->module = 'user'; |
||
51 | |||
52 | $res = $this->_post('info/batchget', $user_list); |
||
53 | |||
54 | return $res; |
||
55 | } |
||
56 | |||
99 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.