Code Duplication    Length = 5-5 lines in 2 locations

lib/modules/mod_json.php 2 locations

@@ 748-752 (lines=5) @@
745
                                    $key = $this->decode($parts[1]);
746
                                    $val = $this->decode($parts[2]);
747
748
                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
749
                                        $obj[$key] = $val;
750
                                    } else {
751
                                        $obj->$key = $val;
752
                                    }
753
                                } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
754
                                    // name:value pair, where name is unquoted
755
                                    $key = $parts[1];
@@ 758-762 (lines=5) @@
755
                                    $key = $parts[1];
756
                                    $val = $this->decode($parts[2]);
757
758
                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
759
                                        $obj[$key] = $val;
760
                                    } else {
761
                                        $obj->$key = $val;
762
                                    }
763
                                }
764
765
                            }