Code Duplication    Length = 3-3 lines in 4 locations

src/ShapeFile.php 4 locations

@@ 149-151 (lines=3) @@
146
        }
147
148
        if (in_array($this->shapeType, array(11, 13, 15, 18, 21, 23, 25, 28))) {
149
            if (!isset($this->boundingBox['mmin']) || $this->boundingBox['mmin'] == 0.0 || ($this->boundingBox['mmin'] > $record->SHPData['mmin'])) {
150
                $this->boundingBox['mmin'] = $record->SHPData['mmin'];
151
            }
152
            if (!isset($this->boundingBox['mmax']) || $this->boundingBox['mmax'] == 0.0 || ($this->boundingBox['mmax'] < $record->SHPData['mmax'])) {
153
                $this->boundingBox['mmax'] = $record->SHPData['mmax'];
154
            }
@@ 152-154 (lines=3) @@
149
            if (!isset($this->boundingBox['mmin']) || $this->boundingBox['mmin'] == 0.0 || ($this->boundingBox['mmin'] > $record->SHPData['mmin'])) {
150
                $this->boundingBox['mmin'] = $record->SHPData['mmin'];
151
            }
152
            if (!isset($this->boundingBox['mmax']) || $this->boundingBox['mmax'] == 0.0 || ($this->boundingBox['mmax'] < $record->SHPData['mmax'])) {
153
                $this->boundingBox['mmax'] = $record->SHPData['mmax'];
154
            }
155
        }
156
157
        if (in_array($this->shapeType, array(11, 13, 15, 18))) {
@@ 158-160 (lines=3) @@
155
        }
156
157
        if (in_array($this->shapeType, array(11, 13, 15, 18))) {
158
            if (!isset($this->boundingBox['zmin']) || $this->boundingBox['zmin'] == 0.0 || ($this->boundingBox['zmin'] > $record->SHPData['zmin'])) {
159
                $this->boundingBox['zmin'] = $record->SHPData['zmin'];
160
            }
161
            if (!isset($this->boundingBox['zmax']) || $this->boundingBox['zmax'] == 0.0 || ($this->boundingBox['zmax'] < $record->SHPData['zmax'])) {
162
                $this->boundingBox['zmax'] = $record->SHPData['zmax'];
163
            }
@@ 161-163 (lines=3) @@
158
            if (!isset($this->boundingBox['zmin']) || $this->boundingBox['zmin'] == 0.0 || ($this->boundingBox['zmin'] > $record->SHPData['zmin'])) {
159
                $this->boundingBox['zmin'] = $record->SHPData['zmin'];
160
            }
161
            if (!isset($this->boundingBox['zmax']) || $this->boundingBox['zmax'] == 0.0 || ($this->boundingBox['zmax'] < $record->SHPData['zmax'])) {
162
                $this->boundingBox['zmax'] = $record->SHPData['zmax'];
163
            }
164
        }
165
166
        return (count($this->records) - 1);