Skip to content

Commit

Permalink
Merge pull request #298 from TransbankDevelopers/refactor/delete-empt…
Browse files Browse the repository at this point in the history
…y-catch-block

refactor: remove empty catch block
  • Loading branch information
mastudillot authored Sep 10, 2024
2 parents 07afffc + fea78a8 commit c7ee7aa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Utils/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ public function request(
): ResponseInterface {
$installedVersion = 'unknown';

if (class_exists('\Composer\InstalledVersions')) {
try {
$installedVersion = InstalledVersions::getVersion('transbank/transbank-sdk');
} catch (\Exception $e) {
}
if (class_exists('\Composer\InstalledVersions') && InstalledVersions::isInstalled('transbank/transbank-sdk')) {
$installedVersion = InstalledVersions::getVersion('transbank/transbank-sdk') ?? 'unknown';
}

$baseHeaders = [
Expand Down

0 comments on commit c7ee7aa

Please sign in to comment.