| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | */ |
||
| 13 | public static function getTorrentAge($torrent) |
||
| 14 | { |
||
| 15 | $date = isset($torrent[Torrent\Get::DONE_DATE]) && $torrent[Torrent\Get::DONE_DATE] ? |
||
| 16 | $torrent[Torrent\Get::DONE_DATE] : |
||
| 17 | (isset($torrent[Torrent\Get::ADDED_DATE]) ? $torrent[Torrent\Get::ADDED_DATE] : 0); |
||
| 18 | return $date ? time() - $date : 0; |
||
| 19 | } |
||
| 20 | |||
| 31 |