diff --git a/src/Services/InfoProviderSystem/DTOtoEntityConverter.php b/src/Services/InfoProviderSystem/DTOtoEntityConverter.php index ac971ba9..3c1e4cca 100644 --- a/src/Services/InfoProviderSystem/DTOtoEntityConverter.php +++ b/src/Services/InfoProviderSystem/DTOtoEntityConverter.php @@ -160,9 +160,8 @@ final class DTOtoEntityConverter //Try to map the category to an existing entity (but never create a new one) if ($dto->category) { - /** @var CategoryRepository $categoryRepo */ - $categoryRepo = $this->em->getRepository(Category::class); - $entity->setCategory($categoryRepo->findForInfoProvider($dto->category)); + //@phpstan-ignore-next-line For some reason php does not recognize the repo returns a category + $entity->setCategory($this->em->getRepository(Category::class)->findForInfoProvider($dto->category)); } $entity->setManufacturer($this->getOrCreateEntity(Manufacturer::class, $dto->manufacturer)); diff --git a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanHelper.php b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanHelper.php index 322922ff..6d2cb8c9 100644 --- a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanHelper.php +++ b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanHelper.php @@ -75,7 +75,7 @@ final class BarcodeScanHelper * will try to guess the type. * @param string $input * @param BarcodeSourceType|null $type - * @return LocalBarcodeScanResult + * @return BarcodeScanResultInterface */ public function scanBarcodeContent(string $input, ?BarcodeSourceType $type = null): BarcodeScanResultInterface { diff --git a/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php b/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php index 0764401a..0b4f4b56 100644 --- a/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php +++ b/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php @@ -53,7 +53,7 @@ class EIGP114BarcodeScanResult implements BarcodeScanResultInterface public readonly ?int $quantity; /** - * @var string|mixed|null Customer assigned purchase order number + * @var string|null Customer assigned purchase order number */ public readonly ?string $customerPO; @@ -104,7 +104,7 @@ class EIGP114BarcodeScanResult implements BarcodeScanResultInterface public readonly ?string $packageId1; /** - * @var string|mixed|null + * @var string|null * 4S - Package ID for Logistic Carton with like items */ public readonly ?string $packageId2; @@ -317,7 +317,7 @@ class EIGP114BarcodeScanResult implements BarcodeScanResultInterface ]; //Iterate over all fields of this object and add them to the array if they are not null - foreach($this as $key => $value) { + foreach((array) $this as $key => $value) { //Skip data key if ($key === 'data') { continue;