Conditions | 4 |
Paths | 8 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function isProxyValid(?string $proxy = null) |
||
23 | { |
||
24 | $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme', 'quad', 'moto', 'velo', |
||
25 | 'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ]; |
||
26 | |||
27 | $GoogleSerp = new Search($keywords[array_rand($keywords)]); |
||
28 | $GoogleSerp->setTld('fr')->setLanguage('fr')->setSleep(0)->setNbrPage(1)->setCache(false); |
||
29 | if ($proxy) { |
||
30 | $GoogleSerp->setProxy($proxy); |
||
31 | } |
||
32 | $r = $GoogleSerp->extractResults(); |
||
33 | |||
34 | return false === $r || empty($r) ? false : true; |
||
35 | } |
||
37 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.