Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2063-2073 (lines=11) @@
2060
     *
2061
     * @return Worksheet
2062
     */
2063
    public function insertNewRowBefore($pBefore = 1, $pNumRows = 1)
2064
    {
2065
        if ($pBefore >= 1) {
2066
            $objReferenceHelper = ReferenceHelper::getInstance();
2067
            $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this);
2068
        } else {
2069
            throw new Exception('Rows can only be inserted before at least row 1.');
2070
        }
2071
2072
        return $this;
2073
    }
2074
2075
    /**
2076
     * Insert a new column, updating all possible related data.
@@ 2085-2095 (lines=11) @@
2082
     *
2083
     * @return Worksheet
2084
     */
2085
    public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1)
2086
    {
2087
        if (!is_numeric($pBefore)) {
2088
            $objReferenceHelper = ReferenceHelper::getInstance();
2089
            $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
2090
        } else {
2091
            throw new Exception('Column references should not be numeric.');
2092
        }
2093
2094
        return $this;
2095
    }
2096
2097
    /**
2098
     * Insert a new column, updating all possible related data.