Code Duplication    Length = 5-5 lines in 2 locations

src/ReportingCloud.php 2 locations

@@ 504-508 (lines=5) @@
501
            'mergeData' => $mergeData,
502
        ];
503
504
        if (null !== $templateFilename) {
505
            $template         = file_get_contents($templateFilename);
506
            $template         = base64_encode($template);
507
            $json['template'] = $template;
508
        }
509
510
        if (count($mergeSettings) > 0) {
511
            $json['mergeSettings'] = $this->buildMergeSettingsArray($mergeSettings);
@@ 575-579 (lines=5) @@
572
            'findAndReplaceData' => $this->buildFindAndReplaceDataArray($findAndReplaceData),
573
        ];
574
575
        if (null !== $templateFilename) {
576
            $template         = file_get_contents($templateFilename);
577
            $template         = base64_encode($template);
578
            $json['template'] = $template;
579
        }
580
581
        if (count($mergeSettings) > 0) {
582
            $json['mergeSettings'] = $this->buildMergeSettingsArray($mergeSettings);