Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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