Code Duplication    Length = 21-21 lines in 2 locations

src/PhpSpreadsheet/Shared/JAMA/Matrix.php 2 locations

@@ 239-259 (lines=21) @@
236
                    return $R;
237
                    break;
238
                //A($i0...$iF); $CL = array of column indices
239
                case 'integer,integer,array':
240
                    list($i0, $iF, $CL) = $args;
241
                    if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
242
                        $m = $iF - $i0;
243
                    } else {
244
                        throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION);
245
                    }
246
                    if (count($CL) > 0) {
247
                        $n = count($CL);
248
                    } else {
249
                        throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION);
250
                    }
251
                    $R = new self($m, $n);
252
                    for ($i = $i0; $i < $iF; ++$i) {
253
                        for ($j = 0; $j < $n; ++$j) {
254
                            $R->set($i - $i0, $j, $this->A[$RL[$i]][$j]);
255
                        }
256
                    }
257
258
                    return $R;
259
                    break;
260
                //$RL = array of row indices
261
                case 'array,integer,integer':
262
                    list($RL, $j0, $jF) = $args;
@@ 261-281 (lines=21) @@
258
                    return $R;
259
                    break;
260
                //$RL = array of row indices
261
                case 'array,integer,integer':
262
                    list($RL, $j0, $jF) = $args;
263
                    if (count($RL) > 0) {
264
                        $m = count($RL);
265
                    } else {
266
                        throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION);
267
                    }
268
                    if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
269
                        $n = $jF - $j0;
270
                    } else {
271
                        throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION);
272
                    }
273
                    $R = new self($m, $n + 1);
274
                    for ($i = 0; $i < $m; ++$i) {
275
                        for ($j = $j0; $j <= $jF; ++$j) {
276
                            $R->set($i, $j - $j0, $this->A[$RL[$i]][$j]);
277
                        }
278
                    }
279
280
                    return $R;
281
                    break;
282
                default:
283
                    throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
284
                    break;