Skip to content

Commit

Permalink
Apply fixes from StyleCI (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored Aug 10, 2017
1 parent d1db493 commit 13c5619
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getCertificates(string $hostName): array

$fullCertificateChain = array_merge([$peerCertificate], $peerCertificateChain);

return array_map(function($certificate) {
return array_map(function ($certificate) {
$certificateFields = openssl_x509_parse($certificate);

return new SslCertificate($certificateFields);
Expand Down Expand Up @@ -127,11 +127,12 @@ protected function fetchCertificates(string $hostName): array
$this->handleRequestFailure($hostName, $thrown);
}

if (!$client) {
if (! $client) {
throw CouldNotDownloadCertificate::unknownError($hostName, "Could not connect to `{$hostName}`.");
}

$response = stream_context_get_params($client);

return $response;
}

Expand Down

0 comments on commit 13c5619

Please sign in to comment.