| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 76 | public function getMostSharedTopic() |
||
| 77 | { |
||
| 78 | $topCount = 0; |
||
| 79 | $mostSharedTopic = null; |
||
| 80 | |||
| 81 | foreach ($this->data as $topic) { |
||
| 82 | if ($topic->getSharesCount() > $topCount) { |
||
| 83 | $topCount = $topic->getSharesCount(); |
||
| 84 | $mostSharedTopic = $topic; |
||
| 85 | } |
||
| 86 | } |
||
| 87 | |||
| 88 | return $mostSharedTopic; |
||
| 89 | } |
||
| 91 |