static function CorrectSpaces($text)
    {
        $chars = '!,;.?:';
        $charArray = str_split($chars);
        foreach ($charArray as $char)
        {
            $text = Str::Replace($char, $char . ' ', $text);
        }
        return  self::RemoveMultipleSpaces($text);
    }
static function CorrectSpaces($text)
    {
        $chars = '!,;.?:';
        $charArray = str_split($chars);
        foreach ($charArray as $char)
        {
            $text = Str::Replace($char, $char . ' ', $text);
        }
        return  self::RemoveMultipleSpaces($text);
    }
static function CorrectSpaces ( $ text ) { $ chars = '!,;.?:' ; $ charArray = str_split ( $ chars ) ; foreach ( $ charArray as $ char ) { $ text = Str :: Replace ( $ char , $ char . ' ' , $ text ) ; } return self :: RemoveMultipleSpaces ( $ text ) ; }
Corrects spaces after syntax characters and erases multiple spaces
@param string $text
@return string
Corrects spaces after syntax characters and erases multiple spaces