Code Duplication    Length = 5-5 lines in 2 locations

src/Controller/Component/FixedLengthExportComponent.php 1 location

@@ 95-99 (lines=5) @@
92
        $return_text = '';
93
        foreach ($list as $row => $list_val) {
94
            $column_options = $fixed_options;
95
            if (array_key_exists($row + 1, $extra_fixed_options)) {
96
                $column_options = $extra_fixed_options[$row + 1];
97
            } elseif (array_key_exists($row - $list_count, $extra_fixed_options)) {
98
                $column_options = $extra_fixed_options[$row - $list_count];
99
            }
100
101
            foreach ($column_options as $fixed_option_key => $fixed_info) {
102
                if (!array_key_exists($fixed_option_key, $list_val)) {

src/Form/FixedLengthImportForm.php 1 location

@@ 67-71 (lines=5) @@
64
            }
65
            $start_point = 0;
66
            $column_list = $fixed_options;
67
            if (array_key_exists($row + 1, $extra_fixed_options)) {
68
                $column_list = $extra_fixed_options[$row + 1];
69
            } elseif (array_key_exists($row - $list_count + 1, $extra_fixed_options)) {
70
                $column_list = $extra_fixed_options[$row - $list_count + 1];
71
            }
72
73
            foreach ($column_list as $column_info) {
74
                $return_info[$row][$column_info['name']] = rtrim(substr($text, $start_point, $column_info['length']));