mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-29 21:49:34 +00:00
Revert SonarQube proposed change. Having more than one return is acceptable nowadays
This commit is contained in:
parent
5852ef9674
commit
e49e2d7976
1 changed files with 19 additions and 20 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue