Conditions | 3 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 9 |
Ratio | 45 % |
Tests | 13 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 2 | public function execute($resource = null) |
|
18 | { |
||
19 | 2 | $this->populateCDNResources(); |
|
20 | |||
21 | 2 | $cdnResources = array_filter($this->cdnResources, function($value, $key) use ($resource) { |
|
|
|||
22 | 2 | return $resource === null || $value['cname'] == $resource; |
|
23 | 2 | }, ARRAY_FILTER_USE_BOTH); |
|
24 | |||
25 | 2 | View Code Duplication | foreach ($cdnResources as $cdnResource) { |
26 | 2 | $this->client->post($this->url, [ |
|
27 | 'form_params' => [ |
||
28 | 2 | 'cdn_id' => $cdnResource['id'], |
|
29 | 2 | 'login' => $this->login, |
|
30 | 2 | 'passwd' => $this->password, |
|
31 | ] |
||
32 | 2 | ]); |
|
33 | 2 | } |
|
34 | |||
35 | 2 | return; |
|
36 | } |
||
37 | } |
||
38 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.