@@ -31,6 +31,7 @@ |
||
31 | 31 | * @param HttpClient $httpClient |
32 | 32 | * @param \ComponentManager\Platform\Platform $platform |
33 | 33 | * @param \stdClass $options |
34 | + * @return void |
|
34 | 35 | */ |
35 | 36 | public function __construct(Filesystem $filesystem, HttpClient $httpClient, |
36 | 37 | Platform $platform, stdClass $options); |
@@ -14,8 +14,8 @@ |
||
14 | 14 | use ComponentManager\ComponentVersion; |
15 | 15 | use ComponentManager\HttpClient; |
16 | 16 | use ComponentManager\Platform\Platform; |
17 | -use stdClass; |
|
18 | 17 | use Symfony\Component\Filesystem\Filesystem; |
18 | +use stdClass; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Package repository interface. |
@@ -18,8 +18,8 @@ |
||
18 | 18 | use DateTime; |
19 | 19 | use OutOfBoundsException; |
20 | 20 | use Psr\Log\LoggerInterface; |
21 | -use stdClass; |
|
22 | 21 | use Symfony\Component\HttpFoundation\Request; |
22 | +use stdClass; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Atlassian Stash project package repository. |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * @return mixed The JSON-decoded representation of the response body. |
322 | 322 | */ |
323 | - protected function get($path, array $queryParams=[]) { |
|
323 | + protected function get($path, array $queryParams = []) { |
|
324 | 324 | $uri = $this->options->uri . $path; |
325 | 325 | $uri = $this->httpClient->createUri($uri) |
326 | 326 | ->withQuery(http_build_query($queryParams)); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * |
340 | 340 | * @return mixed The value attribute of the JSON-decoded response body. |
341 | 341 | */ |
342 | - protected function getAllPages($path, array $queryParams=[]) { |
|
342 | + protected function getAllPages($path, array $queryParams = []) { |
|
343 | 343 | $values = []; |
344 | 344 | |
345 | 345 | $responseBody = (object) [ |
@@ -325,7 +325,7 @@ |
||
325 | 325 | $uri = $this->httpClient->createUri($uri) |
326 | 326 | ->withQuery(http_build_query($queryParams)); |
327 | 327 | $message = $this->httpClient->createRequest(Request::METHOD_GET, $uri) |
328 | - ->withHeader('Authorization', "Basic {$this->options->authentication}"); |
|
328 | + ->withHeader('Authorization', "basic {$this->options->authentication}"); |
|
329 | 329 | $response = $this->httpClient->sendRequest($message); |
330 | 330 | |
331 | 331 | return json_decode($response->getBody()); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * @return RequestInterface |
80 | 80 | */ |
81 | 81 | public function createRequest($method, $uri, $headers=[], $body=null, |
82 | - $protocolVersion='1.1') { |
|
82 | + $protocolVersion='1.1') { |
|
83 | 83 | return $this->messageFactory->createRequest( |
84 | 84 | $method, $uri, $headers, $body, $protocolVersion); |
85 | 85 | } |
@@ -78,8 +78,8 @@ |
||
78 | 78 | * |
79 | 79 | * @return RequestInterface |
80 | 80 | */ |
81 | - public function createRequest($method, $uri, $headers=[], $body=null, |
|
82 | - $protocolVersion='1.1') { |
|
81 | + public function createRequest($method, $uri, $headers = [], $body = null, |
|
82 | + $protocolVersion = '1.1') { |
|
83 | 83 | return $this->messageFactory->createRequest( |
84 | 84 | $method, $uri, $headers, $body, $protocolVersion); |
85 | 85 | } |