@@ -2,9 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Dekalee\Cdn77\Query; |
4 | 4 | |
5 | -use Dekalee\Cdn77\Exception\QueryErrorException; |
|
6 | -use GuzzleHttp\Client; |
|
7 | - |
|
8 | 5 | /** |
9 | 6 | * Class PurgeFileQuery |
10 | 7 | */ |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $urls = []; |
26 | 26 | foreach ($files as $file) { |
27 | - $urls[] = '/' . urlencode($file); |
|
27 | + $urls[] = '/'.urlencode($file); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | $cdnResources = array_filter($this->cdnResources, function($value, $key) use ($resource) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $this->url = $url; |
29 | 29 | $this->login = $login; |
30 | - $this->client = $client?: new Client(); |
|
30 | + $this->client = $client ?: new Client(); |
|
31 | 31 | $this->password = $password; |
32 | 32 | } |
33 | 33 |
@@ -28,9 +28,9 @@ |
||
28 | 28 | */ |
29 | 29 | public function __construct(ListResourcesQuery $listResourcesQuery, $login, $password, $url = null, Client $client = null) |
30 | 30 | { |
31 | - $this->url = null === $url?static::URL: $url; |
|
31 | + $this->url = null === $url ? static::URL : $url; |
|
32 | 32 | $this->login = $login; |
33 | - $this->client = $client?: new Client(); |
|
33 | + $this->client = $client ?: new Client(); |
|
34 | 34 | $this->password = $password; |
35 | 35 | $this->listResourcesQuery = $listResourcesQuery; |
36 | 36 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $this->url = $url; |
29 | 29 | $this->login = $login; |
30 | - $this->client = $client?: new Client(); |
|
30 | + $this->client = $client ?: new Client(); |
|
31 | 31 | $this->password = $password; |
32 | 32 | } |
33 | 33 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | foreach ($this->cdnResources as $cdnResource) { |
22 | 22 | if (false !== strpos($cdnResource['cname'], $resource)) { |
23 | - $url = sprintf($this->url . '?login=%s&passwd=%s&cdn_id=%d&period=4&http_status[]=cached&http_status[]=noncached', |
|
23 | + $url = sprintf($this->url.'?login=%s&passwd=%s&cdn_id=%d&period=4&http_status[]=cached&http_status[]=noncached', |
|
24 | 24 | $this->login, |
25 | 25 | $this->password, |
26 | 26 | $cdnResource['id'] |