Code Duplication    Length = 8-8 lines in 2 locations

src/ShapeFile.php 2 locations

@@ 280-287 (lines=8) @@
277
      @dbase_pack($this->DBFFile);
278
    }
279
280
    function _openSHPFile($toWrite = false) {
281
      $this->SHPFile = @fopen(str_replace('.*', '.shp', $this->FileName), ($toWrite ? "wb+" : "rb"));
282
      if (!$this->SHPFile) {
283
        return $this->setError(sprintf("It wasn't possible to open the Shape file '%s'", str_replace('.*', '.shp', $this->FileName)));
284
      }
285
286
      return TRUE;
287
    }
288
289
    function _closeSHPFile() {
290
      if ($this->SHPFile) {
@@ 296-303 (lines=8) @@
293
      }
294
    }
295
296
    function _openSHXFile($toWrite = false) {
297
      $this->SHXFile = @fopen(str_replace('.*', '.shx', $this->FileName), ($toWrite ? "wb+" : "rb"));
298
      if (!$this->SHXFile) {
299
        return $this->setError(sprintf("It wasn't possible to open the Index file '%s'", str_replace('.*', '.shx', $this->FileName)));
300
      }
301
302
      return TRUE;
303
    }
304
305
    function _closeSHXFile() {
306
      if ($this->SHXFile) {