@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * Wolnościowiec / WebProxy |
@@ -1,10 +1,10 @@ |
||
| 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', |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Entity; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Factory; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Factory; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Factory; |
| 4 | 4 | |
@@ -29,15 +29,15 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Providers\Proxy; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Wolnosciowiec\WebProxy\Providers\Proxy; |
| 4 | 4 | |