@@ -356,17 +356,17 @@ |
||
356 | 356 | return Inflector::transliterate($string, $transliterator); |
357 | 357 | } |
358 | 358 | |
359 | - /** |
|
360 | - * Limits a string by word count. If $substring is provided, and truncating occurs, the |
|
361 | - * string is further truncated so that the substring may be appended without |
|
362 | - * exceeding the desired length. |
|
363 | - * |
|
364 | - * @param string $string |
|
365 | - * @param int $length |
|
366 | - * @param string $substring |
|
367 | - * |
|
368 | - * @return string |
|
369 | - */ |
|
359 | + /** |
|
360 | + * Limits a string by word count. If $substring is provided, and truncating occurs, the |
|
361 | + * string is further truncated so that the substring may be appended without |
|
362 | + * exceeding the desired length. |
|
363 | + * |
|
364 | + * @param string $string |
|
365 | + * @param int $length |
|
366 | + * @param string $substring |
|
367 | + * |
|
368 | + * @return string |
|
369 | + */ |
|
370 | 370 | public function wordLimit(string $string, int $length, string $substring = '…'): string |
371 | 371 | { |
372 | 372 | $words = preg_split("/[\s]+/", strip_tags($string) ); |