Code Duplication    Length = 6-6 lines in 2 locations

includes/vendor/pomo/pomo/src/MO.php 2 locations

@@ 110-115 (lines=6) @@
107
108
        $reader = new Reader();
109
110
        foreach ($entries as $entry) {
111
            $originals_table .= $this->export_original($entry) . chr(0);
112
            $length = $reader->strlen($this->export_original($entry));
113
            fwrite($fh, pack('VV', $length, $current_addr));
114
            $current_addr += $length + 1; // account for the NULL byte after
115
        }
116
117
        $exported_headers = $this->export_headers();
118
        fwrite($fh, pack(
@@ 126-131 (lines=6) @@
123
        $current_addr += strlen($exported_headers) + 1;
124
        $translations_table = $exported_headers . chr(0);
125
126
        foreach ($entries as $entry) {
127
            $translations_table .= $this->export_translations($entry).chr(0);
128
            $length = $reader->strlen($this->export_translations($entry));
129
            fwrite($fh, pack('VV', $length, $current_addr));
130
            $current_addr += $length + 1;
131
        }
132
133
        fwrite($fh, $originals_table);
134
        fwrite($fh, $translations_table);