Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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