| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 12 | class UserIdentity extends CUserIdentity |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var int the user ID |
||
| 17 | */ |
||
| 18 | private $_userId; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Authenticates a user |
||
| 22 | * @return int the error code (ERROR_NONE if authentication succeeded) |
||
| 23 | */ |
||
| 24 | public function authenticate() |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Returns the user ID |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | public function getId() |
||
| 64 | } |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: