Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5026-5032 (lines=7) @@
5023
      return null;
5024
    }
5025
5026
    if ($offset || $length !== null) {
5027
      $strTmp = self::substr($str, $offset, $length);
5028
      if ($strTmp === false) {
5029
        return null;
5030
      }
5031
      $str = $strTmp;
5032
    }
5033
5034
    $str = (string)$str;
5035
    if (!isset($str[0])) {
@@ 5919-5925 (lines=7) @@
5916
   */
5917
  public static function strspn($str, $mask, $offset = 0, $length = null)
5918
  {
5919
    if ($offset || $length !== null) {
5920
      $strTmp = self::substr($str, $offset, $length);
5921
      if ($strTmp === false) {
5922
        $strTmp = '';
5923
      }
5924
      $str = (string)$strTmp;
5925
    }
5926
5927
    $str = (string)$str;
5928
    if (!isset($str[0], $mask[0])) {