Code Duplication    Length = 15-15 lines in 2 locations

model/VocabularyConfig.php 2 locations

@@ 191-205 (lines=15) @@
188
     * @return string array class URI or null
189
     */
190
191
    public function getAdditionalSearchProperties()
192
    {
193
        $resources = $this->resource->allResources("skosmos:showPropertyInSearch");
194
        $ret = array();
195
        foreach ($resources as $res) {
196
            $prop = $res->getURI();
197
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible
198
            {
199
                $prop = EasyRdf\RdfNamespace::shorten($prop);
200
            }
201
202
            $ret[] = $prop;
203
        }
204
        return $ret;
205
    }
206
207
    /**
208
     * Queries whether the property should be shown with all the label language variations.
@@ 367-381 (lines=15) @@
364
     * @return string array class URI or null
365
     */
366
367
    public function getHierarchyProperty()
368
    {
369
        $resources = $this->resource->allResources("skosmos:hierarchyProperty");
370
        $ret = array();
371
        foreach ($resources as $res) {
372
            $prop = $res->getURI();
373
            if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible
374
            {
375
                $prop = EasyRdf\RdfNamespace::shorten($prop);
376
            }
377
378
            $ret[] = $prop;
379
        }
380
        return empty($ret) ? array('skos:broader') : $ret;
381
    }
382
383
    /**
384
     * Returns a boolean value set in the config.ttl config.