Code Duplication    Length = 18-18 lines in 2 locations

src/Stringy.php 2 locations

@@ 1993-2010 (lines=18) @@
1990
     *
1991
     * @return static
1992
     */
1993
    public function lineWrap(
1994
        int $limit,
1995
        string $break = "\n",
1996
        bool $add_final_break = true,
1997
        string $delimiter = null
1998
    ): self {
1999
        return static::create(
2000
            $this->utf8::wordwrap_per_line(
2001
                $this->str,
2002
                $limit,
2003
                $break,
2004
                true,
2005
                $add_final_break,
2006
                $delimiter
2007
            ),
2008
            $this->encoding
2009
        );
2010
    }
2011
2012
    /**
2013
     * Line-Wrap the string after $limit, but also after the next word.
@@ 2029-2046 (lines=18) @@
2026
     *
2027
     * @return static
2028
     */
2029
    public function lineWrapAfterWord(
2030
        int $limit,
2031
        string $break = "\n",
2032
        bool $add_final_break = true,
2033
        string $delimiter = null
2034
    ): self {
2035
        return static::create(
2036
            $this->utf8::wordwrap_per_line(
2037
                $this->str,
2038
                $limit,
2039
                $break,
2040
                false,
2041
                $add_final_break,
2042
                $delimiter
2043
            ),
2044
            $this->encoding
2045
        );
2046
    }
2047
2048
    /**
2049
     * Splits on newlines and carriage returns, returning an array of Stringy