Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 2 | public function map(Crawler $node) |
|
19 | { |
||
20 | 2 | $table = $node->filter('table')->eq(1); |
|
21 | |||
22 | 2 | return $table->filter('tbody > tr')->each(function (Crawler $row) { |
|
23 | 2 | $cols = $row->children(); |
|
24 | |||
25 | 2 | return new DeliveryOption( |
|
26 | 2 | $cols->eq(0)->text(), |
|
27 | 2 | $cols->eq(1)->text(), |
|
28 | 2 | $this->parseFloat($cols->eq(2)->text()), |
|
29 | 2 | $cols->eq(3)->text() |
|
30 | 2 | ); |
|
31 | 2 | }); |
|
32 | } |
||
33 | |||
46 |