Test Failed
Push — master ( 69ec80...e8bb53 )
by Dev
03:37
created
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.
Tests/SearchTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $Google = new SearchViaCurl('piedweb.com');
13 13
         $Google
14
-                 ->setNbrPage(1) // Get Only first Page
15
-                 ->setTld('fr')
16
-                 ->setLanguage('fr')
17
-                 ->setSleep(1)
18
-                 ->setCacheFolder(null)
14
+                    ->setNbrPage(1) // Get Only first Page
15
+                    ->setTld('fr')
16
+                    ->setLanguage('fr')
17
+                    ->setSleep(1)
18
+                    ->setCacheFolder(null)
19 19
         ;
20 20
         $results = $Google->extractResults();
21 21
 
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $Google = new SearchViaCurl('piedweb.com');
28 28
         $Google
29
-                 ->setNbrPage(1) // Get Only first Page
30
-                 ->setTld('fr')
31
-                 ->setLanguage('fr')
32
-                 ->setSleep(1)
33
-                 ->setMobile(true)
34
-                 ->setCacheFolder(null)
29
+                    ->setNbrPage(1) // Get Only first Page
30
+                    ->setTld('fr')
31
+                    ->setLanguage('fr')
32
+                    ->setSleep(1)
33
+                    ->setMobile(true)
34
+                    ->setCacheFolder(null)
35 35
         ;
36 36
         $results = $Google->extractResults();
37 37
 
Please login to merge, or discard this patch.
Tests/QwantSearchTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $Qwant = new QwantSearchViaCurl('piedweb.com');
13 13
         $Qwant->setNbrPage(1) // Get Only first Page
14
-                 ->setCacheFolder(null)
14
+                    ->setCacheFolder(null)
15 15
         ;
16 16
         $results = $Qwant->extractResults();
17 17
 
Please login to merge, or discard this patch.
src/google/TestProxy.php 1 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.
src/google/Search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     public function extractResults()
95 95
     {
96 96
         for ($this->page = 1; $this->page <= $this->nbrPage; ++$this->page) {
97
-            if (! isset($url)) {// On génère l'url pour la première requète... Ensuite, on utilisera le lien Suivant.
97
+            if (!isset($url)) {// On génère l'url pour la première requète... Ensuite, on utilisera le lien Suivant.
98 98
                 $url = $this->generateGoogleSearchUrl();
99 99
             }
100 100
 
Please login to merge, or discard this patch.
src/qwant/QwantSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     public function extractResults()
95 95
     {
96 96
         for ($this->page = 1; $this->page <= $this->nbrPage; ++$this->page) {
97
-            if (! isset($url)) {// On génère l'url pour la première requète... Ensuite, on utilisera le lien Suivant.
97
+            if (!isset($url)) {// On génère l'url pour la première requète... Ensuite, on utilisera le lien Suivant.
98 98
                 $url = $this->generateGoogleSearchUrl();
99 99
             }
100 100
 
Please login to merge, or discard this patch.
src/google/CacheTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function deleteCacheFiles(): int
44 44
     {
45
-        if (! $this->cacheFolder) {
45
+        if (!$this->cacheFolder) {
46 46
             throw new Exception('Cache Folder is not defined : you can\'t delete cache files');
47 47
         }
48 48
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     protected function getCacheManager(): ?SimpleCacheFile
60 60
     {
61
-        if (! $this->cacheFolder) {
61
+        if (!$this->cacheFolder) {
62 62
             return null;
63 63
         }
64 64
 
Please login to merge, or discard this patch.