Skip to content

Commit

Permalink
Merge pull request #133 from storekeeper-company/feature-86949g88u-se…
Browse files Browse the repository at this point in the history
…micolon-breaks

fix: concatenation of details instead of overwrite if its the same attribute
  • Loading branch information
sabas authored Apr 17, 2024
2 parents 2ad6fac + 6f3406c commit fe5d6b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/EDI/Analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ public function process(array $data, array $rawSegments = null): string
$r[] = ' '.\wordwrap($d_sub_desc_attr['desc'], 69, \PHP_EOL.' ');
$r[] = ' type: '.$d_sub_desc_attr['type'];

$jsoncomposite[$d_sub_desc_attr['name']] = $d_detail;
if (isset($jsoncomposite[$d_sub_desc_attr['name']])) {
$jsoncomposite[$d_sub_desc_attr['name']] .= $d_detail;
} else {
$jsoncomposite[$d_sub_desc_attr['name']] = $d_detail;
}

if (isset($d_sub_desc_attr['maxlength'])) {
$r[] = ' maxlen: '.$d_sub_desc_attr['maxlength'];
}
Expand Down

0 comments on commit fe5d6b6

Please sign in to comment.