Code Duplication    Length = 5-5 lines in 2 locations

_inc/lib/geolite2/Reader.php 2 locations

@@ 192-196 (lines=5) @@
189
190
        // XXX - probably could condense this.
191
        switch ($this->metadata->recordSize) {
192
            case 24:
193
                $bytes = Util::read($this->fileHandle, $baseOffset + $index * 3, 3);
194
                list(, $node) = unpack('N', "\x00" . $bytes);
195
196
                return $node;
197
            case 28:
198
                $middleByte = Util::read($this->fileHandle, $baseOffset + 3, 1);
199
                list(, $middle) = unpack('C', $middleByte);
@@ 209-213 (lines=5) @@
206
                list(, $node) = unpack('N', chr($middle) . $bytes);
207
208
                return $node;
209
            case 32:
210
                $bytes = Util::read($this->fileHandle, $baseOffset + $index * 4, 4);
211
                list(, $node) = unpack('N', $bytes);
212
213
                return $node;
214
            default:
215
                throw new InvalidDatabaseException(
216
                    'Unknown record size: '