Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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