Revert SonarQube proposed change. Having more than one return is acceptable nowadays

This commit is contained in:
Marc Kreidler 2025-12-18 15:23:21 +01:00
parent 5852ef9674
commit e49e2d7976

View file

@ -465,7 +465,9 @@ class BuerklinProvider implements BatchInfoProviderInterface
public function searchByKeyword(string $keyword): array public function searchByKeyword(string $keyword): array
{ {
$keyword = strtoupper(trim($keyword)); $keyword = strtoupper(trim($keyword));
if (!empty($keyword)) { if ($keyword === '') {
return [];
}
$response = $this->makeAPICall('/products/search/', [ $response = $this->makeAPICall('/products/search/', [
'pageSize' => 50, 'pageSize' => 50,
@ -488,9 +490,6 @@ class BuerklinProvider implements BatchInfoProviderInterface
} catch (\Throwable $e) { } catch (\Throwable $e) {
return []; return [];
} }
} else {
return [];
}
} }
public function getDetails(string $id): PartDetailDTO public function getDetails(string $id): PartDetailDTO