Skip to content

Commit 04a7a9c

Browse files
committed
fix unitest
1 parent 1d567ad commit 04a7a9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SensiolabHelper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,17 @@ public function getSensiolabVulnerabilties($fileLock)
7979
$this->command->error("ClientException!\nMessage: " . $e->getMessage());
8080
$colorTag = $this->getColorTagForStatusCode($e->getResponse()->getStatusCode());
8181
$this->command->line("HTTP StatusCode: <{$colorTag}>" . $e->getResponse()->getStatusCode() . "<{$colorTag}>");
82-
$this->printMessage($e->getResponse() === null ? '' : $e->getResponse());
82+
$resp = $e->getResponse();
83+
$this->printMessage($resp === null ? '' : $resp);
8384
$this->printMessage($e->getRequest());
8485
} catch (\GuzzleHttp\Exception\RequestException $e) {
8586
$this->command->error("RequestException!\nMessage: " . $e->getMessage());
8687
$this->printMessage($e->getRequest());
8788
if ($e->hasResponse()) {
8889
$colorTag = $this->getColorTagForStatusCode($e->getResponse()->getStatusCode());
8990
$this->command->line("HTTP StatusCode: <{$colorTag}>" . $e->getResponse()->getStatusCode() . "<{$colorTag}>");
90-
$this->printMessage($e->getResponse() === null ? '' : $e->getResponse());
91+
$resp = $e->getResponse();
92+
$this->printMessage($resp === null ? '' : $resp);
9193
}
9294
}
9395
return $response;

0 commit comments

Comments
 (0)