From 5b9551395554850b6815b0dc550ed99761bef531 Mon Sep 17 00:00:00 2001 From: Marcel Diegelmann Date: Mon, 16 Feb 2026 09:56:43 +0100 Subject: [PATCH] Typdefinitionen in BOMImporter anpassen --- src/Services/ImportExportSystem/BOMImporter.php | 14 +++++++------- .../ImportExportSystem/BOMImporterTest.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Services/ImportExportSystem/BOMImporter.php b/src/Services/ImportExportSystem/BOMImporter.php index 7c4643f0..67c91d37 100644 --- a/src/Services/ImportExportSystem/BOMImporter.php +++ b/src/Services/ImportExportSystem/BOMImporter.php @@ -243,13 +243,13 @@ class BOMImporter /** * Import string data into an array of BOM entries, which are not yet assigned to a project. * - * @param Project|Assembly $importObject The object determining the context of the BOM entry (either a Project or Assembly). - * @param string $data The data to import - * @param array $options An array of options + * @param object $importObject The object determining the context of the BOM entry (either a Project or Assembly). + * @param string $data The data to import + * @param array $options An array of options * - * @return ProjectBOMEntry[]|AssemblyBOMEntry[] An array of imported entries + * @return ProjectBOMEntry[]|AssemblyBOMEntry[]|object[] An array of imported entries */ - public function stringToBOMEntries(Project|Assembly $importObject, string $data, array $options): array + public function stringToBOMEntries(object $importObject, string $data, array $options): array { $resolver = new OptionsResolver(); $resolver = $this->configureOptions($resolver); @@ -299,12 +299,12 @@ class BOMImporter * The BOM entries are added to the provided Project or Assembly, depending on the context. * * @param string $data The semicolon- or comma-delimited CSV data to be parsed. - * @param Project|Assembly $importObject The object determining the context of the BOM entry (either a Project or Assembly). + * @param object $importObject The object determining the context of the BOM entry (either a Project or Assembly). * @return ImporterResult The result of the import process, containing the created BOM entries. * * @throws UnexpectedValueException If required fields are missing in the provided data. */ - private function parseKiCADPCB(string $data, Project|Assembly $importObject): ImporterResult + private function parseKiCADPCB(string $data, object $importObject): ImporterResult { $result = new ImporterResult(); diff --git a/tests/Services/ImportExportSystem/BOMImporterTest.php b/tests/Services/ImportExportSystem/BOMImporterTest.php index 25da6989..980b7f1a 100644 --- a/tests/Services/ImportExportSystem/BOMImporterTest.php +++ b/tests/Services/ImportExportSystem/BOMImporterTest.php @@ -788,7 +788,7 @@ final class BOMImporterTest extends WebTestCase 'Quantity' => 'Quantity' ]; - $bom_entries = $this->service->stringToBOMEntries($input, [ + $bom_entries = $this->service->stringToBOMEntries($lcscSupplier, $input, [ 'type' => 'kicad_schematic', 'field_mapping' => $field_mapping, 'delimiter' => ','