Code Duplication    Length = 15-15 lines in 2 locations

model/VocabularyConfig.php 2 locations

@@ 254-268 (lines=15) @@
251
     * @return array array class URI or null
252
     */
253
254
    public function getAdditionalSearchProperties()
255
    {
256
        $resources = $this->resource->allResources("skosmos:showPropertyInSearch");
257
        $ret = array();
258
        foreach ($resources as $res) {
259
            $prop = $res->getURI();
260
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible
261
            {
262
                $prop = EasyRdf\RdfNamespace::shorten($prop);
263
            }
264
265
            $ret[] = $prop;
266
        }
267
        return $ret;
268
    }
269
270
    /**
271
     * Queries whether the property should be shown with all the label language variations.
@@ 447-461 (lines=15) @@
444
     * @return array array class URI or null
445
     */
446
447
    public function getHierarchyProperty()
448
    {
449
        $resources = $this->resource->allResources("skosmos:hierarchyProperty");
450
        $ret = array();
451
        foreach ($resources as $res) {
452
            $prop = $res->getURI();
453
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible
454
            {
455
                $prop = EasyRdf\RdfNamespace::shorten($prop);
456
            }
457
458
            $ret[] = $prop;
459
        }
460
        return empty($ret) ? array('skos:broader') : $ret;
461
    }
462
463
    /**
464
     * Returns a boolean value set in the config.ttl config.