Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5033-5039 (lines=7) @@
5030
      return null;
5031
    }
5032
5033
    if ($offset || $length !== null) {
5034
      $strTmp = self::substr($str, $offset, $length);
5035
      if ($strTmp === false) {
5036
        return null;
5037
      }
5038
      $str = (string)$strTmp;
5039
    }
5040
5041
    $str = (string)$str;
5042
    if (!isset($str[0])) {
@@ 5939-5945 (lines=7) @@
5936
   */
5937
  public static function strspn($str, $mask, $offset = 0, $length = null)
5938
  {
5939
    if ($offset || $length !== null) {
5940
      $strTmp = self::substr($str, $offset, $length);
5941
      if ($strTmp === false) {
5942
        $strTmp = '';
5943
      }
5944
      $str = (string)$strTmp;
5945
    }
5946
5947
    $str = (string)$str;
5948
    if (!isset($str[0], $mask[0])) {