Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5109-5115 (lines=7) @@
5106
      return null;
5107
    }
5108
5109
    if ($offset || $length !== null) {
5110
      $strTmp = self::substr($str, $offset, $length);
5111
      if ($strTmp === false) {
5112
        return null;
5113
      }
5114
      $str = (string)$strTmp;
5115
    }
5116
5117
    $str = (string)$str;
5118
    if (!isset($str[0])) {
@@ 6016-6022 (lines=7) @@
6013
   */
6014
  public static function strspn($str, $mask, $offset = 0, $length = null)
6015
  {
6016
    if ($offset || $length !== null) {
6017
      $strTmp = self::substr($str, $offset, $length);
6018
      if ($strTmp === false) {
6019
        $strTmp = '';
6020
      }
6021
      $str = (string)$strTmp;
6022
    }
6023
6024
    $str = (string)$str;
6025
    if (!isset($str[0], $mask[0])) {