Skip to content

Commit

Permalink
factor: remove empty catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed Sep 10, 2024
1 parent 07afffc commit fea78a8
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 fea78a8

Please sign in to comment.