Skip to content

Commit fe5d6b6

Browse files
authored
Merge pull request #133 from storekeeper-company/feature-86949g88u-semicolon-breaks
fix: concatenation of details instead of overwrite if its the same attribute
2 parents 2ad6fac + 6f3406c commit fe5d6b6

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)