| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function getCollection($entity) |
||
|
|
|||
| 24 | { |
||
| 25 | foreach ($this->collections as $collection) { |
||
| 26 | if ($collection->support($entity)) { |
||
| 27 | return $collection; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | $new = new Collection($this->reflector); |
||
| 32 | $new->support($entity); |
||
| 33 | |||
| 34 | return $this->collections[] = $new; |
||
| 35 | } |
||
| 36 | |||
| 42 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.