Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class TorrentMenuItemBuilder |
||
8 | { |
||
9 | 12 | public static function title(Crawler $row) |
|
10 | { |
||
11 | 12 | $itemMetada = []; |
|
12 | |||
13 | 12 | $row->children('td')->nextAll()->each(function ($column) use (&$itemMetada) { |
|
14 | 12 | $itemMetada[] = trim($column->text()); |
|
15 | 12 | }); |
|
16 | |||
17 | 12 | return trim(self::buildTitle($itemMetada)); |
|
18 | } |
||
19 | |||
20 | 12 | public static function subtitle(Crawler $row) |
|
21 | { |
||
22 | 12 | return trim(strstr(trim($row->text('', false)), PHP_EOL, true)); |
|
23 | } |
||
24 | |||
25 | 12 | public static function pageLink(Crawler $row) |
|
26 | { |
||
27 | 12 | return $row->children('td a.cellMainLink')->eq(0)->attr('href'); |
|
28 | } |
||
29 | |||
30 | 12 | protected static function buildTitle($metadata) |
|
35 | } |
||
36 | |||
37 | 12 | protected static function buildTimeagoValue($timeago) |
|
44 | } |
||
45 | } |
||
46 |