Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5183-5189 (lines=7) @@
5180
   */
5181
  public static function str_to_lines(string $str, bool $removeEmptyValues = false, int $removeShortValues = null): array
5182
  {
5183
    if (!isset($str[0])) {
5184
      if ($removeEmptyValues === true) {
5185
        return [];
5186
      }
5187
5188
      return [''];
5189
    }
5190
5191
    $return = \preg_split("/[\r\n]{1,2}/u", $str);
5192
@@ 5222-5228 (lines=7) @@
5219
   */
5220
  public static function str_to_words(string $str, string $charList = '', bool $removeEmptyValues = false, int $removeShortValues = null): array
5221
  {
5222
    if (!isset($str[0])) {
5223
      if ($removeEmptyValues === true) {
5224
        return [];
5225
      }
5226
5227
      return [''];
5228
    }
5229
5230
    $charList = self::rxClass($charList, '\pL');
5231