From 9732b71f85cc40eacc892794416353df54fd7fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 5 Nov 2023 21:42:39 +0100 Subject: [PATCH] Fixed other placeholders besides the IPN Barcodes --- phpstan.dist.neon | 2 +- .../LabelSystem/PlaceholderProviders/BarcodeProvider.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index b2ae4824..646d29e6 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -26,7 +26,7 @@ parameters: checkUninitializedProperties: true - checkFunctionNameCase: true + checkFunctionNameCase: false checkAlwaysTrueInstanceof: false checkAlwaysTrueCheckTypeFunctionCall: false diff --git a/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php b/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php index 80685e86..dd70177f 100644 --- a/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php +++ b/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php @@ -75,7 +75,8 @@ final class BarcodeProvider implements PlaceholderProviderInterface return $this->barcodeGenerator->generateHTMLBarcode($label_options, $label_target); } - if ($label_target instanceof Part || $label_target instanceof PartLot) { + if (($label_target instanceof Part || $label_target instanceof PartLot) + && str_starts_with($placeholder, '[[IPN_BARCODE_')) { if ($label_target instanceof PartLot) { $label_target = $label_target->getPart(); }