Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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