Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

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