Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3253-3264 (lines=12) @@
3250
   * <i>json</i> cannot be decoded or if the encoded
3251
   * data is deeper than the recursion limit.
3252
   */
3253
  public static function json_decode($json, $assoc = false, $depth = 512, $options = 0)
3254
  {
3255
    $json = (string)self::filter($json);
3256
3257
    if (Bootup::is_php('5.4') === true) {
3258
      $json = json_decode($json, $assoc, $depth, $options);
3259
    } else {
3260
      $json = json_decode($json, $assoc, $depth);
3261
    }
3262
3263
    return $json;
3264
  }
3265
3266
  /**
3267
   * (PHP 5 &gt;= 5.2.0, PECL json &gt;= 1.2.0)<br/>
@@ 3302-3313 (lines=12) @@
3299
   *
3300
   * @return string a JSON encoded string on success or <b>FALSE</b> on failure.
3301
   */
3302
  public static function json_encode($value, $options = 0, $depth = 512)
3303
  {
3304
    $value = self::filter($value);
3305
3306
    if (Bootup::is_php('5.5') === true) {
3307
      $json = json_encode($value, $options, $depth);
3308
    } else {
3309
      $json = json_encode($value, $options);
3310
    }
3311
3312
    return $json;
3313
  }
3314
3315
  /**
3316
   * Makes string's first char lowercase.