Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 10 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
46 | View Code Duplication | protected function getCurrentManagerId() |
|
47 | { |
||
48 | $currentUser = $this->getCurrentUserInfo(); |
||
49 | |||
50 | if(!isset($currentUser['manager']['id'])) { |
||
51 | throw new HeadHunterApiException('Cannot resolve manager id'); |
||
52 | } |
||
53 | |||
54 | return $currentUser['manager']['id']; |
||
55 | } |
||
56 | |||
64 | } |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.