Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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