mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed some inspection issues
This commit is contained in:
parent
33475dca66
commit
42e604245c
85 changed files with 272 additions and 291 deletions
|
@ -40,7 +40,7 @@ class LCSCProvider implements InfoProviderInterface
|
|||
|
||||
public const DISTRIBUTOR_NAME = 'LCSC';
|
||||
|
||||
public function __construct(private readonly HttpClientInterface $lcscClient, private string $currency, private bool $enabled = true)
|
||||
public function __construct(private readonly HttpClientInterface $lcscClient, private readonly string $currency, private readonly bool $enabled = true)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -152,10 +152,7 @@ class LCSCProvider implements InfoProviderInterface
|
|||
}
|
||||
|
||||
//Build category by concatenating the catalogName and parentCatalogName
|
||||
$category = null;
|
||||
if (isset($product['parentCatalogName'])) {
|
||||
$category = $product['parentCatalogName'];
|
||||
}
|
||||
$category = $product['parentCatalogName'] ?? null;
|
||||
if (isset($product['catalogName'])) {
|
||||
$category = ($category ?? '') . ' -> ' . $product['catalogName'];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue