Code Duplication    Length = 16-16 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 510-525 (lines=16) @@
507
     * @param EasyRdf_Sparql_Result $result
508
     * @return array Array with URIs (string) as key and array of (label, superclassURI) as value
509
     */
510
    private function transformQueryTypesResults($result) {
511
        $ret = array();
512
        foreach ($result as $row) {
513
            $type = array();
514
            if (isset($row->label)) {
515
                $type['label'] = $row->label->getValue();
516
            }
517
518
            if (isset($row->superclass)) {
519
                $type['superclass'] = $row->superclass->getUri();
520
            }
521
522
            $ret[$row->type->getURI()] = $type;
523
        }
524
        return $ret;
525
    }
526
527
    /**
528
     * Retrieve information about types from the endpoint
@@ 1982-1997 (lines=16) @@
1979
     * @param EasyRdf_Sparql_Result $result
1980
     * @return array
1981
     */
1982
    private function transformChangeListResults($result) {
1983
        $ret = array();
1984
        foreach ($result as $row) {
1985
            $concept = array('uri' => $row->concept->getURI());
1986
            if (isset($row->label)) {
1987
                $concept['prefLabel'] = $row->label->getValue();
1988
            }
1989
1990
            if (isset($row->date)) {
1991
                $concept['date'] = $row->date->getValue();
1992
            }
1993
1994
            $ret[] = $concept;
1995
        }
1996
        return $ret;
1997
    }
1998
1999
    /**
2000
     * return a list of recently changed or entirely new concepts