Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3245-3256 (lines=12) @@
3242
   * <i>json</i> cannot be decoded or if the encoded
3243
   * data is deeper than the recursion limit.
3244
   */
3245
  public static function json_decode($json, $assoc = false, $depth = 512, $options = 0)
3246
  {
3247
    $json = (string)self::filter($json);
3248
3249
    if (Bootup::is_php('5.4') === true) {
3250
      $json = json_decode($json, $assoc, $depth, $options);
3251
    } else {
3252
      $json = json_decode($json, $assoc, $depth);
3253
    }
3254
3255
    return $json;
3256
  }
3257
3258
  /**
3259
   * (PHP 5 &gt;= 5.2.0, PECL json &gt;= 1.2.0)<br/>
@@ 3294-3305 (lines=12) @@
3291
   *
3292
   * @return string a JSON encoded string on success or <b>FALSE</b> on failure.
3293
   */
3294
  public static function json_encode($value, $options = 0, $depth = 512)
3295
  {
3296
    $value = self::filter($value);
3297
3298
    if (Bootup::is_php('5.5') === true) {
3299
      $json = json_encode($value, $options, $depth);
3300
    } else {
3301
      $json = json_encode($value, $options);
3302
    }
3303
3304
    return $json;
3305
  }
3306
3307
  /**
3308
   * Makes string's first char lowercase.