@@ -22,6 +22,10 @@ discard block |
||
| 22 | 22 | /** @var int */ |
| 23 | 23 | private $timeout; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $apiToken |
|
| 27 | + * @param null|string $apiSecret |
|
| 28 | + */ |
|
| 25 | 29 | public function __construct( |
| 26 | 30 | ?string $apiToken, |
| 27 | 31 | ?string $apiSecret, |
@@ -173,6 +177,9 @@ discard block |
||
| 173 | 177 | return new Response($headers, $body, $error); |
| 174 | 178 | } |
| 175 | 179 | |
| 180 | + /** |
|
| 181 | + * @param resource $curlHandle |
|
| 182 | + */ |
|
| 176 | 183 | private function attachRequestPayload(&$curlHandle, array $data) |
| 177 | 184 | { |
| 178 | 185 | $encoded = json_encode($data); |
@@ -26,6 +26,9 @@ |
||
| 26 | 26 | return $exception; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @return string|null |
|
| 31 | + */ |
|
| 29 | 32 | public static function getMessageForResponse(Response $response) |
| 30 | 33 | { |
| 31 | 34 | return "Response code {$response->getHttpResponseCode()} returned"; |
@@ -142,6 +142,9 @@ |
||
| 142 | 142 | return $this; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | + /** |
|
| 146 | + * @param string $applicationPath |
|
| 147 | + */ |
|
| 145 | 148 | public function setApplicationPath(?string $applicationPath) |
| 146 | 149 | { |
| 147 | 150 | $this->applicationPath = $applicationPath; |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param integer $totalNumberOfLineInFile |
|
| 61 | + */ |
|
| 59 | 62 | private function getBounds($totalNumberOfLineInFile): array |
| 60 | 63 | { |
| 61 | 64 | $startLine = max($this->surroundingLine - floor($this->snippetLineCount / 2), 1); |