Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3305-3316 (lines=12) @@
3302
   * <i>json</i> cannot be decoded or if the encoded
3303
   * data is deeper than the recursion limit.
3304
   */
3305
  public static function json_decode($json, $assoc = false, $depth = 512, $options = 0)
3306
  {
3307
    $json = (string)self::filter($json);
3308
3309
    if (Bootup::is_php('5.4') === true) {
3310
      $json = json_decode($json, $assoc, $depth, $options);
3311
    } else {
3312
      $json = json_decode($json, $assoc, $depth);
3313
    }
3314
3315
    return $json;
3316
  }
3317
3318
  /**
3319
   * (PHP 5 &gt;= 5.2.0, PECL json &gt;= 1.2.0)<br/>
@@ 3354-3365 (lines=12) @@
3351
   *
3352
   * @return string a JSON encoded string on success or <b>FALSE</b> on failure.
3353
   */
3354
  public static function json_encode($value, $options = 0, $depth = 512)
3355
  {
3356
    $value = self::filter($value);
3357
3358
    if (Bootup::is_php('5.5') === true) {
3359
      $json = json_encode($value, $options, $depth);
3360
    } else {
3361
      $json = json_encode($value, $options);
3362
    }
3363
3364
    return $json;
3365
  }
3366
3367
  /**
3368
   * Makes string's first char lowercase.