Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
25 | public function execute() |
||
26 | { |
||
27 | $path = sprintf( |
||
28 | "project/%s/download/%s?key=%s", |
||
29 | $this->client->getProjectIdentifier(), |
||
30 | $this->package, |
||
31 | $this->client->getProjectApiKey() |
||
32 | ); |
||
33 | if (null !== $this->branch) { |
||
34 | $path = sprintf('%s&branch=%s', $path, $this->branch); |
||
35 | } |
||
36 | $request = $this->client->getHttpClient()->get($path); |
||
37 | $response = $request |
||
38 | ->setResponseBody($this->copyDestination.DIRECTORY_SEPARATOR.$this->package) |
||
39 | ->send(); |
||
40 | |||
41 | return $response->getBody(true); |
||
42 | } |
||
43 | |||
104 |