| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 13 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | View Code Duplication | public function findById($id) |
|
| 63 | { |
||
| 64 | $it = $this->getIterator(); |
||
| 65 | $it->rewind(); |
||
| 66 | while($it->valid()) { |
||
| 67 | if($it->current()->getId() == $id) { |
||
| 68 | return $it->current(); |
||
| 69 | } |
||
| 70 | $it->next(); |
||
| 71 | } |
||
| 72 | |||
| 73 | return false; |
||
| 74 | } |
||
| 75 | |||
| 76 | } |