Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Calculation/MathTrig.php 2 locations

@@ 626-639 (lines=14) @@
623
624
        try {
625
            $rowA = 0;
626
            foreach ($matrixData1 as $matrixRow) {
627
                if (!is_array($matrixRow)) {
628
                    $matrixRow = [$matrixRow];
629
                }
630
                $columnA = 0;
631
                foreach ($matrixRow as $matrixCell) {
632
                    if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
633
                        return Functions::VALUE();
634
                    }
635
                    $matrixAData[$rowA][$columnA] = $matrixCell;
636
                    ++$columnA;
637
                }
638
                ++$rowA;
639
            }
640
            $matrixA = new \PhpSpreadsheet\Shared\JAMA\Matrix($matrixAData);
641
            $rowB = 0;
642
            foreach ($matrixData2 as $matrixRow) {
@@ 642-655 (lines=14) @@
639
            }
640
            $matrixA = new \PhpSpreadsheet\Shared\JAMA\Matrix($matrixAData);
641
            $rowB = 0;
642
            foreach ($matrixData2 as $matrixRow) {
643
                if (!is_array($matrixRow)) {
644
                    $matrixRow = [$matrixRow];
645
                }
646
                $columnB = 0;
647
                foreach ($matrixRow as $matrixCell) {
648
                    if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
649
                        return Functions::VALUE();
650
                    }
651
                    $matrixBData[$rowB][$columnB] = $matrixCell;
652
                    ++$columnB;
653
                }
654
                ++$rowB;
655
            }
656
            $matrixB = new \PhpSpreadsheet\Shared\JAMA\Matrix($matrixBData);
657
658
            if ($columnA != $rowB) {