Code Duplication    Length = 5-5 lines in 2 locations

src/Import/FixedLengthImport.php 1 location

@@ 59-63 (lines=5) @@
56
            }
57
            $startPoint = 0;
58
            $columnList = $baseColumnList;
59
            if (array_key_exists($row + 1, $extraFixedOptions)) {
60
                $columnList = $extraFixedOptions[$row + 1];
61
            } elseif (array_key_exists($row - $listCount + 1, $extraFixedOptions)) {
62
                $columnList = $extraFixedOptions[$row - $listCount + 1];
63
            }
64
65
            foreach ($columnList as $columnInfo) {
66
                $returnInfo[$row][$columnInfo['name']] = rtrim(substr($text, $startPoint, $columnInfo['length']));

src/Export/FixedLengthExport.php 1 location

@@ 98-102 (lines=5) @@
95
    private function getColumnOptions($fixedOptions, $row, $extraFixedOptions, $listCount)
96
    {
97
        $columnOptions = $fixedOptions;
98
        if (array_key_exists($row + 1, $extraFixedOptions)) {
99
            $columnOptions = $extraFixedOptions[$row + 1];
100
        } elseif (array_key_exists($row - $listCount, $extraFixedOptions)) {
101
            $columnOptions = $extraFixedOptions[$row - $listCount];
102
        }
103
        return $columnOptions;
104
    }
105