Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2038-2048 (lines=11) @@
2035
     * @throws    Exception
2036
     * @return Worksheet
2037
     */
2038
    public function insertNewRowBefore($pBefore = 1, $pNumRows = 1)
2039
    {
2040
        if ($pBefore >= 1) {
2041
            $objReferenceHelper = ReferenceHelper::getInstance();
2042
            $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this);
2043
        } else {
2044
            throw new Exception('Rows can only be inserted before at least row 1.');
2045
        }
2046
2047
        return $this;
2048
    }
2049
2050
    /**
2051
     * Insert a new column, updating all possible related data
@@ 2058-2068 (lines=11) @@
2055
     * @throws    Exception
2056
     * @return Worksheet
2057
     */
2058
    public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1)
2059
    {
2060
        if (!is_numeric($pBefore)) {
2061
            $objReferenceHelper = ReferenceHelper::getInstance();
2062
            $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
2063
        } else {
2064
            throw new Exception('Column references should not be numeric.');
2065
        }
2066
2067
        return $this;
2068
    }
2069
2070
    /**
2071
     * Insert a new column, updating all possible related data