Test Failed
Branch master (9dd5cd)
by Blackred
03:57
created
web/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 /*
4 4
  * Wolnościowiec / WebProxy
Please login to merge, or discard this patch.
config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 $settings = [
4 4
     'apiKey'                 => getenv('WW_TOKEN') ? getenv('WW_TOKEN') : 'your-api-key-here',
5 5
     'externalProxyProviders' => getenv('WW_EXTERNAL_PROXIES') !== false ? getenv('WW_EXTERNAL_PROXIES') : '',
6 6
     'cache'                  => new \Doctrine\Common\Cache\FilesystemCache(__DIR__ . '/var/cache'),
7
-    'connectionTimeout'      => getenv('WW_TIMEOUT') !== false ? (int)getenv('WW_TIMEOUT') : 10,
7
+    'connectionTimeout'      => getenv('WW_TIMEOUT') !== false ? (int) getenv('WW_TIMEOUT') : 10,
8 8
 
9 9
     // examples
10 10
     #'externalProxyProviders' => 'FreeProxyListProvider',
Please login to merge, or discard this patch.
src/Entity/ProxyServerAddress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Entity;
4 4
 
Please login to merge, or discard this patch.
src/Factory/ProxyProviderFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Factory;
4 4
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,11 +59,9 @@
 block discarded – undo
59 59
         foreach ($names as $name) {
60 60
             if (class_exists($defaultNamespace . $name)) {
61 61
                 $fullName = $defaultNamespace . $name;
62
-            }
63
-            elseif (class_exists($name)) {
62
+            } elseif (class_exists($name)) {
64 63
                 $fullName = $name;
65
-            }
66
-            else {
64
+            } else {
67 65
                 throw new \Exception('Invalid provider name "' . $name . '", please check the configuration');
68 66
             }
69 67
 
Please login to merge, or discard this patch.
src/Factory/RequestFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Factory;
4 4
 
Please login to merge, or discard this patch.
src/Factory/ProxyClientFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Factory;
4 4
 
Please login to merge, or discard this patch.
src/Providers/Proxy/FreeProxyListProvider.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
         $crawler = $this->client->request('GET', 'http://free-proxy-list.net');
30 30
         $rows = $crawler->filter('#proxylisttable tr');
31 31
 
32
-        $addresses = $rows->each(function (Crawler $node) {
32
+        $addresses = $rows->each(function(Crawler $node) {
33 33
             $collection = $node->filter('td');
34 34
 
35 35
             // cells mapping
36 36
             $lastVerificationTime = @$collection->getNode(7)->textContent;
37 37
             $proxyType = @$collection->getNode(4)->textContent;
38
-            $proxyPort = (int)@$collection->getNode(1)->textContent;
38
+            $proxyPort = (int) @$collection->getNode(1)->textContent;
39 39
             $proxyIP   = @$collection->getNode(0)->textContent;
40
-            $proxySchema =@ $collection->getNode(6)->textContent == 'yes' ? 'https' : 'http';
40
+            $proxySchema = @ $collection->getNode(6)->textContent == 'yes' ? 'https' : 'http';
41 41
 
42 42
             if (!$proxyIP || !$proxyPort || strlen($lastVerificationTime) === 0 || !$proxyType) {
43 43
                 return null;
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
             $multiply = 1;
85 85
         }
86 86
 
87
-        return ((int)$parts[0] * $multiply) <= (60 * 5); // 5 minutes
87
+        return ((int) $parts[0] * $multiply) <= (60 * 5); // 5 minutes
88 88
     }
89 89
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,14 +73,11 @@
 block discarded – undo
73 73
 
74 74
         if (in_array($parts[1], ['minute', 'minutes'])) {
75 75
             $multiply = 60;
76
-        }
77
-        elseif (in_array($parts[1], ['hour', 'hours'])) {
76
+        } elseif (in_array($parts[1], ['hour', 'hours'])) {
78 77
             $multiply = 60 * 60;
79
-        }
80
-        elseif (in_array($parts[1], ['day', 'days'])) {
78
+        } elseif (in_array($parts[1], ['day', 'days'])) {
81 79
             $multiply = 60 * 60 * 24;
82
-        }
83
-        elseif (in_array($parts[1], ['second', 'seconds'])) {
80
+        } elseif (in_array($parts[1], ['second', 'seconds'])) {
84 81
             $multiply = 1;
85 82
         }
86 83
 
Please login to merge, or discard this patch.
src/Providers/Proxy/DummyProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Providers\Proxy;
4 4
 
Please login to merge, or discard this patch.
src/Providers/Proxy/ChainProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Wolnosciowiec\WebProxy\Providers\Proxy;
4 4
 
Please login to merge, or discard this patch.