Code Duplication    Length = 15-15 lines in 2 locations

model/VocabularyConfig.php 2 locations

@@ 428-442 (lines=15) @@
425
     * @return string array class URI or null
426
     */
427
428
    public function getHierarchyProperty()
429
    {
430
        $resources = $this->resource->allResources("skosmos:hierarchyProperty");
431
        $ret = array();
432
        foreach ($resources as $res) {
433
            $prop = $res->getURI();
434
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible
435
            {
436
                $prop = EasyRdf\RdfNamespace::shorten($prop);
437
            }
438
439
            $ret[] = $prop;
440
        }
441
        return empty($ret) ? array('skos:broader') : $ret;
442
    }
443
444
    /**
445
     * Returns a boolean value set in the config.ttl config.
@@ 235-249 (lines=15) @@
232
     * @return string array class URI or null
233
     */
234
235
    public function getAdditionalSearchProperties()
236
    {
237
        $resources = $this->resource->allResources("skosmos:showPropertyInSearch");
238
        $ret = array();
239
        foreach ($resources as $res) {
240
            $prop = $res->getURI();
241
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible
242
            {
243
                $prop = EasyRdf\RdfNamespace::shorten($prop);
244
            }
245
246
            $ret[] = $prop;
247
        }
248
        return $ret;
249
    }
250
251
    /**
252
     * Queries whether the property should be shown with all the label language variations.