| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | View Code Duplication | protected function getCurrentEmployerId() |
|
| 36 | { |
||
| 37 | $currentUser = $this->getCurrentUserInfo(); |
||
| 38 | |||
| 39 | if(!isset($currentUser['employer']['id'])) { |
||
| 40 | throw new HeadHunterApiException('Cannot resolve employer id'); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $currentUser['employer']['id']; |
||
| 44 | } |
||
| 45 | |||
| 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.