Completed
Push — master ( da075f...6fdbf9 )
by Dev
02:56 queued 56s
created
Tests/SearchTest.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
     {
11 11
         $Google = new SearchViaCurl('piedweb.com');
12 12
         $Google
13
-                 ->setNbrPage(1) // Get Only first Page
14
-                 ->setTld('fr')
15
-                 ->setLanguage('fr')
16
-                 ->setSleep(1)
17
-                 ->setCacheFolder(null)
13
+                    ->setNbrPage(1) // Get Only first Page
14
+                    ->setTld('fr')
15
+                    ->setLanguage('fr')
16
+                    ->setSleep(1)
17
+                    ->setCacheFolder(null)
18 18
         ;
19 19
         $results =  $Google->extractResults();
20 20
 
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $Google = new SearchViaCurl('piedweb.com');
27 27
         $Google
28
-                 ->setNbrPage(1) // Get Only first Page
29
-                 ->setTld('fr')
30
-                 ->setLanguage('fr')
31
-                 ->setSleep(1)
32
-                 ->setMobile(true)
33
-                 ->setCacheFolder(null)
28
+                    ->setNbrPage(1) // Get Only first Page
29
+                    ->setTld('fr')
30
+                    ->setLanguage('fr')
31
+                    ->setSleep(1)
32
+                    ->setMobile(true)
33
+                    ->setCacheFolder(null)
34 34
         ;
35 35
         $results =  $Google->extractResults();
36 36
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
                  ->setSleep(1)
17 17
                  ->setCacheFolder(null)
18 18
         ;
19
-        $results =  $Google->extractResults();
19
+        $results = $Google->extractResults();
20 20
 
21 21
         $this->assertEquals('https://piedweb.com/', $results[0]['link']);
22 22
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                  ->setMobile(true)
33 33
                  ->setCacheFolder(null)
34 34
         ;
35
-        $results =  $Google->extractResults();
35
+        $results = $Google->extractResults();
36 36
 
37 37
         $this->assertEquals('https://piedweb.com/', $results[0]['link']);
38 38
     }
Please login to merge, or discard this patch.
Tests/QwantSearchTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         $Qwant = new QwantSearchViaCurl('piedweb.com');
12 12
         $Qwant->setNbrPage(1) // Get Only first Page
13
-                 ->setCacheFolder(null)
13
+                    ->setCacheFolder(null)
14 14
         ;
15 15
         $results =  $Qwant->extractResults();
16 16
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         $Qwant->setNbrPage(1) // Get Only first Page
13 13
                  ->setCacheFolder(null)
14 14
         ;
15
-        $results =  $Qwant->extractResults();
15
+        $results = $Qwant->extractResults();
16 16
 
17 17
         $this->assertEquals('https://piedweb.com/', $results[0]['link']);
18 18
     }
Please login to merge, or discard this patch.
demo.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 $Google = new SearchViaCurl('qwanturank');
12 12
 
13 13
 $Google->setTld('fr')
14
-         ->setLanguage('fr')
15
-         ->setSleep(6)  // to wait between 2 requests on Google
16
-         ->setCacheFolder(null) // to disable storing in the /tmp folder
17
-         //->setCacheExpireTime(86400) // 1 Day
18
-         ->setNbrPage(1) // Nbr de page à extraire
19
-         ->setParameter('num', 100) // to add a parameter in the search url
14
+            ->setLanguage('fr')
15
+            ->setSleep(6)  // to wait between 2 requests on Google
16
+            ->setCacheFolder(null) // to disable storing in the /tmp folder
17
+            //->setCacheExpireTime(86400) // 1 Day
18
+            ->setNbrPage(1) // Nbr de page à extraire
19
+            ->setParameter('num', 100) // to add a parameter in the search url
20 20
 ;
21 21
 
22 22
 var_dump($Google->extractResults());
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 $Qwant = new QwantSearchViaCurl('qwanturank');
29 29
 
30 30
 $Qwant->setLanguage('fr')
31
-         ->setSleep(6)  // to wait between 2 requests on Qwant
32
-         ->setCacheFolder('./tmp') // to disable storing in the /tmp folder
33
-         ->setNbrPage(10) // Nbr de page à extraire
31
+            ->setSleep(6)  // to wait between 2 requests on Qwant
32
+            ->setCacheFolder('./tmp') // to disable storing in the /tmp folder
33
+            ->setNbrPage(10) // Nbr de page à extraire
34 34
 ;
35 35
 
36 36
 $results = $Qwant->extractResults();
Please login to merge, or discard this patch.
google/TestProxy.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function isProxyValid(?string $proxy = null)
23 23
     {
24 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', ];
25
+                            'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ];
26 26
 
27 27
         $GoogleSerp = new Search($keywords[array_rand($keywords)]);
28 28
         $GoogleSerp->setTld('fr')->setLanguage('fr')->setSleep(0)->setNbrPage(1)->setCache(false);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function isProxyValid(?string $proxy = null)
23 23
     {
24
-        $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme',  'quad', 'moto', 'velo',
24
+        $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme', 'quad', 'moto', 'velo',
25 25
                            'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ];
26 26
 
27 27
         $GoogleSerp = new Search($keywords[array_rand($keywords)]);
Please login to merge, or discard this patch.