| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 12 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | View Code Duplication | public function findKey(UserEntity $user) |
|
| 48 | { |
||
| 49 | $it = $this->getIterator(); |
||
| 50 | $it->rewind(); |
||
| 51 | while($it->valid()) { |
||
| 52 | if($it->current()->getId() == $user->getId()) { |
||
| 53 | return $it->key(); |
||
| 54 | } |
||
| 55 | $it->next(); |
||
| 56 | } |
||
| 57 | return false; |
||
| 58 | } |
||
| 59 | |||
| 76 | } |