Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5064-5070 (lines=7) @@
5061
      return null;
5062
    }
5063
5064
    if ($offset || $length !== null) {
5065
      $strTmp = self::substr($str, $offset, $length);
5066
      if ($strTmp === false) {
5067
        return null;
5068
      }
5069
      $str = (string)$strTmp;
5070
    }
5071
5072
    $str = (string)$str;
5073
    if (!isset($str[0])) {
@@ 5971-5977 (lines=7) @@
5968
   */
5969
  public static function strspn($str, $mask, $offset = 0, $length = null)
5970
  {
5971
    if ($offset || $length !== null) {
5972
      $strTmp = self::substr($str, $offset, $length);
5973
      if ($strTmp === false) {
5974
        $strTmp = '';
5975
      }
5976
      $str = (string)$strTmp;
5977
    }
5978
5979
    $str = (string)$str;
5980
    if (!isset($str[0], $mask[0])) {