Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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