Code Duplication    Length = 9-9 lines in 2 locations

src/ShapeFile.php 2 locations

@@ 315-323 (lines=9) @@
312
        @dbase_pack($this->DBFFile);
313
    }
314
315
    private function _openSHPFile($toWrite = false) {
316
        $shp_name = $this->_getFilename('.shp');
317
        $this->SHPFile = @fopen($shp_name, ($toWrite ? "wb+" : "rb"));
318
        if (!$this->SHPFile) {
319
            return $this->setError(sprintf("It wasn't possible to open the Shape file '%s'", $shp_name));
320
        }
321
322
        return TRUE;
323
    }
324
325
    private function _closeSHPFile() {
326
        if ($this->SHPFile) {
@@ 332-340 (lines=9) @@
329
        }
330
    }
331
332
    private function _openSHXFile($toWrite = false) {
333
        $shx_name = $this->_getFilename('.shx');
334
        $this->SHXFile = @fopen($shx_name, ($toWrite ? "wb+" : "rb"));
335
        if (!$this->SHXFile) {
336
            return $this->setError(sprintf("It wasn't possible to open the Index file '%s'", $shx_name));
337
        }
338
339
        return TRUE;
340
    }
341
342
    private function _closeSHXFile() {
343
        if ($this->SHXFile) {