Code Duplication    Length = 15-15 lines in 2 locations

model/VocabularyConfig.php 2 locations

@@ 244-258 (lines=15) @@
241
     * @return string array class URI or null
242
     */
243
244
    public function getAdditionalSearchProperties()
245
    {
246
        $resources = $this->resource->allResources("skosmos:showPropertyInSearch");
247
        $ret = array();
248
        foreach ($resources as $res) {
249
            $prop = $res->getURI();
250
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible
251
            {
252
                $prop = EasyRdf\RdfNamespace::shorten($prop);
253
            }
254
255
            $ret[] = $prop;
256
        }
257
        return $ret;
258
    }
259
260
    /**
261
     * Queries whether the property should be shown with all the label language variations.
@@ 411-425 (lines=15) @@
408
     * @return string array class URI or null
409
     */
410
411
    public function getHierarchyProperty()
412
    {
413
        $resources = $this->resource->allResources("skosmos:hierarchyProperty");
414
        $ret = array();
415
        foreach ($resources as $res) {
416
            $prop = $res->getURI();
417
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible
418
            {
419
                $prop = EasyRdf\RdfNamespace::shorten($prop);
420
            }
421
422
            $ret[] = $prop;
423
        }
424
        return empty($ret) ? array('skos:broader') : $ret;
425
    }
426
427
    /**
428
     * Returns a boolean value set in the vocabularies.ttl config.