mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-16 22:49:36 +00:00
Fixed PHPstan issue
This commit is contained in:
parent
90c82aab2e
commit
f95e39748e
4 changed files with 4 additions and 4 deletions
|
|
@ -213,7 +213,7 @@ class AttachmentType extends AbstractStructuralDBElement
|
||||||
|
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
foreach ($this->allowed_targets as $target) {
|
foreach ($this->allowed_targets as $target) {
|
||||||
if (Attachment::ORM_DISCRIMINATOR_MAP[$target]) {
|
if (isset(Attachment::ORM_DISCRIMINATOR_MAP[$target])) {
|
||||||
$tmp[] = Attachment::ORM_DISCRIMINATOR_MAP[$target];
|
$tmp[] = Attachment::ORM_DISCRIMINATOR_MAP[$target];
|
||||||
}
|
}
|
||||||
//Otherwise ignore the entry, as it is invalid
|
//Otherwise ignore the entry, as it is invalid
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ class PartMerger implements EntityMergerInterface
|
||||||
$this->useOtherValueIfNotEmtpy($target, $other, 'manufacturer_product_number');
|
$this->useOtherValueIfNotEmtpy($target, $other, 'manufacturer_product_number');
|
||||||
$this->useOtherValueIfNotEmtpy($target, $other, 'mass');
|
$this->useOtherValueIfNotEmtpy($target, $other, 'mass');
|
||||||
$this->useOtherValueIfNotEmtpy($target, $other, 'ipn');
|
$this->useOtherValueIfNotEmtpy($target, $other, 'ipn');
|
||||||
|
$this->useOtherValueIfNotEmtpy($target, $other, 'gtin');
|
||||||
|
|
||||||
//Merge relations to other entities
|
//Merge relations to other entities
|
||||||
$this->useOtherValueIfNotNull($target, $other, 'manufacturer');
|
$this->useOtherValueIfNotNull($target, $other, 'manufacturer');
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,7 @@ class ReicheltProvider implements InfoProviderInterface
|
||||||
$priceString = $dom->filter('meta[itemprop="price"]')->attr('content');
|
$priceString = $dom->filter('meta[itemprop="price"]')->attr('content');
|
||||||
$currency = $dom->filter('meta[itemprop="priceCurrency"]')->attr('content', 'EUR');
|
$currency = $dom->filter('meta[itemprop="priceCurrency"]')->attr('content', 'EUR');
|
||||||
|
|
||||||
|
$gtin = null;
|
||||||
foreach (['gtin13', 'gtin14', 'gtin12', 'gtin8'] as $gtinType) {
|
foreach (['gtin13', 'gtin14', 'gtin12', 'gtin8'] as $gtinType) {
|
||||||
if ($dom->filter("[itemprop=\"$gtinType\"]")->count() > 0) {
|
if ($dom->filter("[itemprop=\"$gtinType\"]")->count() > 0) {
|
||||||
$gtin = $dom->filter("[itemprop=\"$gtinType\"]")->innerText();
|
$gtin = $dom->filter("[itemprop=\"$gtinType\"]")->innerText();
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ readonly class GTINBarcodeScanResult implements BarcodeScanResultInterface
|
||||||
'GTIN' => $this->gtin,
|
'GTIN' => $this->gtin,
|
||||||
'GTIN type' => $obj->getType(),
|
'GTIN type' => $obj->getType(),
|
||||||
'Valid' => $this->validator->isValid() ? 'Yes' : 'No',
|
'Valid' => $this->validator->isValid() ? 'Yes' : 'No',
|
||||||
'Reference Number' => $obj->getReferenceNumber(),
|
|
||||||
'Check Digit' => $obj->getCheckDigit(),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue