Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 1980-1990 (lines=11) @@
1977
     * @throws    Exception
1978
     * @return Worksheet
1979
     */
1980
    public function insertNewRowBefore($pBefore = 1, $pNumRows = 1)
1981
    {
1982
        if ($pBefore >= 1) {
1983
            $objReferenceHelper = ReferenceHelper::getInstance();
1984
            $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this);
1985
        } else {
1986
            throw new Exception('Rows can only be inserted before at least row 1.');
1987
        }
1988
1989
        return $this;
1990
    }
1991
1992
    /**
1993
     * Insert a new column, updating all possible related data
@@ 2000-2010 (lines=11) @@
1997
     * @throws    Exception
1998
     * @return Worksheet
1999
     */
2000
    public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1)
2001
    {
2002
        if (!is_numeric($pBefore)) {
2003
            $objReferenceHelper = ReferenceHelper::getInstance();
2004
            $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
2005
        } else {
2006
            throw new Exception('Column references should not be numeric.');
2007
        }
2008
2009
        return $this;
2010
    }
2011
2012
    /**
2013
     * Insert a new column, updating all possible related data