Skip to content

Commit 6f3406c

Browse files
committed
fix: concatenation of details instead of overwrite if its the same attribute
1 parent 2ad6fac commit 6f3406c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/EDI/Analyser.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,12 @@ public function process(array $data, array $rawSegments = null): string
223223
$r[] = ' '.\wordwrap($d_sub_desc_attr['desc'], 69, \PHP_EOL.' ');
224224
$r[] = ' type: '.$d_sub_desc_attr['type'];
225225

226-
$jsoncomposite[$d_sub_desc_attr['name']] = $d_detail;
226+
if (isset($jsoncomposite[$d_sub_desc_attr['name']])) {
227+
$jsoncomposite[$d_sub_desc_attr['name']] .= $d_detail;
228+
} else {
229+
$jsoncomposite[$d_sub_desc_attr['name']] = $d_detail;
230+
}
231+
227232
if (isset($d_sub_desc_attr['maxlength'])) {
228233
$r[] = ' maxlen: '.$d_sub_desc_attr['maxlength'];
229234
}

0 commit comments

Comments
 (0)