Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Calculation/MathTrig.php 2 locations

@@ 656-669 (lines=14) @@
653
654
        try {
655
            $rowA = 0;
656
            foreach ($matrixData1 as $matrixRow) {
657
                if (!is_array($matrixRow)) {
658
                    $matrixRow = [$matrixRow];
659
                }
660
                $columnA = 0;
661
                foreach ($matrixRow as $matrixCell) {
662
                    if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
663
                        return Functions::VALUE();
664
                    }
665
                    $matrixAData[$rowA][$columnA] = $matrixCell;
666
                    ++$columnA;
667
                }
668
                ++$rowA;
669
            }
670
            $matrixA = new Matrix($matrixAData);
671
            $rowB = 0;
672
            foreach ($matrixData2 as $matrixRow) {
@@ 672-685 (lines=14) @@
669
            }
670
            $matrixA = new Matrix($matrixAData);
671
            $rowB = 0;
672
            foreach ($matrixData2 as $matrixRow) {
673
                if (!is_array($matrixRow)) {
674
                    $matrixRow = [$matrixRow];
675
                }
676
                $columnB = 0;
677
                foreach ($matrixRow as $matrixCell) {
678
                    if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
679
                        return Functions::VALUE();
680
                    }
681
                    $matrixBData[$rowB][$columnB] = $matrixCell;
682
                    ++$columnB;
683
                }
684
                ++$rowB;
685
            }
686
            $matrixB = new Matrix($matrixBData);
687
688
            if ($columnA != $rowB) {