Fixed PHPstan issue

This commit is contained in:
Jan Böhmer 2026-02-08 19:37:44 +01:00
parent 90c82aab2e
commit f95e39748e
4 changed files with 4 additions and 4 deletions

View file

@ -59,6 +59,7 @@ class PartMerger implements EntityMergerInterface
$this->useOtherValueIfNotEmtpy($target, $other, 'manufacturer_product_number');
$this->useOtherValueIfNotEmtpy($target, $other, 'mass');
$this->useOtherValueIfNotEmtpy($target, $other, 'ipn');
$this->useOtherValueIfNotEmtpy($target, $other, 'gtin');
//Merge relations to other entities
$this->useOtherValueIfNotNull($target, $other, 'manufacturer');
@ -184,4 +185,4 @@ class PartMerger implements EntityMergerInterface
}
}
}
}
}

View file

@ -149,6 +149,7 @@ class ReicheltProvider implements InfoProviderInterface
$priceString = $dom->filter('meta[itemprop="price"]')->attr('content');
$currency = $dom->filter('meta[itemprop="priceCurrency"]')->attr('content', 'EUR');
$gtin = null;
foreach (['gtin13', 'gtin14', 'gtin12', 'gtin8'] as $gtinType) {
if ($dom->filter("[itemprop=\"$gtinType\"]")->count() > 0) {
$gtin = $dom->filter("[itemprop=\"$gtinType\"]")->innerText();

View file

@ -43,8 +43,6 @@ readonly class GTINBarcodeScanResult implements BarcodeScanResultInterface
'GTIN' => $this->gtin,
'GTIN type' => $obj->getType(),
'Valid' => $this->validator->isValid() ? 'Yes' : 'No',
'Reference Number' => $obj->getReferenceNumber(),
'Check Digit' => $obj->getCheckDigit(),
];
}