From e4ed22e678d711d04f13e0c6bf7fea16dedc4fc8 Mon Sep 17 00:00:00 2001 From: Quinten Date: Fri, 15 May 2026 10:37:29 +0200 Subject: [PATCH] fix(shacl-parser): address Sonar reduce warnings --- src/components/ShaclForm/Parser/SHACLParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ShaclForm/Parser/SHACLParser.ts b/src/components/ShaclForm/Parser/SHACLParser.ts index bf6c754..a5e6e16 100644 --- a/src/components/ShaclForm/Parser/SHACLParser.ts +++ b/src/components/ShaclForm/Parser/SHACLParser.ts @@ -142,7 +142,7 @@ export abstract class SHACLParser, S extends Shape> { return this.store .match(null, RDF('type'), SHACL('NodeShape'), null) .map((s) => this.loadShapeForm(s.subject)) - .reduce(this.mergeShapes) + .reduce((shape1: S, shape2: S) => this.mergeShapes(shape1, shape2), this.createEmptyShape()) } public parseAllAndGroup(): Group[] { @@ -150,7 +150,7 @@ export abstract class SHACLParser, S extends Shape> { .match(null, RDF('type'), SHACL('NodeShape'), null) .filter((s) => this.store.match(null, null, s.subject).length === 0) .map((s) => this.loadShapeForm(s.subject)) - .reduce(this.mergeShapes) + .reduce((shape1: S, shape2: S) => this.mergeShapes(shape1, shape2), this.createEmptyShape()) return this.group(shape) }