Fixed some inspection issues

This commit is contained in:
Jan Böhmer 2024-03-03 19:57:31 +01:00
parent 33475dca66
commit 42e604245c
85 changed files with 272 additions and 291 deletions

View file

@ -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'];