src/Synthesizer.php
protected function splitText($part)
    {
        if ($part === 'before' || $part === 'rest')
        {
            $parts = explode(static::separator, $this->text);

            if (count($parts) === 1 && $part === 'rest')
            {
                return null;
            }

            return ($part === 'before') ? current($parts) : end($parts);
        }

        return str_replace(static::separator, '', $this->text);
    }
protected function splitText($part)
    {
        if ($part === 'before' || $part === 'rest')
        {
            $parts = explode(static::separator, $this->text);

            if (count($parts) === 1 && $part === 'rest')
            {
                return null;
            }

            return ($part === 'before') ? current($parts) : end($parts);
        }

        return str_replace(static::separator, '', $this->text);
    }
protected function splitText ( $ part ) { if ( $ part === 'before' || $ part === 'rest' ) { $ parts = explode ( static :: separator , $ this -> text ) ; if ( count ( $ parts ) === 1 && $ part === 'rest' ) { return null ; } return ( $ part === 'before' ) ? current ( $ parts ) : end ( $ parts ) ; } return str_replace ( static :: separator , '' , $ this -> text ) ; }
Splits the text into given part

@param string $part
@return string
Splits the text into given part