Code Duplication    Length = 12-12 lines in 2 locations

includes/libraries/protect/AntiXSS/UTF8.php 2 locations

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