Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function getOrganicResults() |
||
23 | { |
||
24 | $results = $this->html->find(str_replace(';', ', ', $this->getSelector('organic'))); |
||
25 | $result = []; |
||
26 | foreach ($results as $r) { |
||
27 | $title = $r->find('h3, [role=heading]', 0); |
||
28 | if ($title) { |
||
29 | $result[] = [ |
||
30 | 'type' => 'organic', |
||
31 | 'title' => $this->normalizeTextFromGoogle($title->innertext), |
||
32 | 'link' => $this->getUrlFromGoogleSerpFromat($r->find('a', 0)->href), |
||
33 | ]; |
||
34 | } |
||
35 | } |
||
36 | |||
37 | return $result; |
||
38 | } |
||
62 |