Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5118-5124 (lines=7) @@
5115
      return null;
5116
    }
5117
5118
    if ($offset || $length !== null) {
5119
      $strTmp = self::substr($str, $offset, $length);
5120
      if ($strTmp === false) {
5121
        return null;
5122
      }
5123
      $str = (string)$strTmp;
5124
    }
5125
5126
    $str = (string)$str;
5127
    if (!isset($str[0])) {
@@ 6024-6030 (lines=7) @@
6021
   */
6022
  public static function strspn($str, $mask, $offset = 0, $length = null)
6023
  {
6024
    if ($offset || $length !== null) {
6025
      $strTmp = self::substr($str, $offset, $length);
6026
      if ($strTmp === false) {
6027
        $strTmp = '';
6028
      }
6029
      $str = (string)$strTmp;
6030
    }
6031
6032
    $str = (string)$str;
6033
    if (!isset($str[0], $mask[0])) {