Code Duplication    Length = 6-6 lines in 2 locations

model/Concept.php 2 locations

@@ 581-586 (lines=6) @@
578
    public function getForeignLabels()
579
    {
580
        $labels = array();
581
        foreach ($this->resource->allLiterals('skos:prefLabel') as $lit) {
582
            // filtering away subsets of the current language eg. en vs en-GB
583
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
584
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel');
585
            }
586
        }
587
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
588
            // filtering away subsets of the current language eg. en vs en-GB
589
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
@@ 587-592 (lines=6) @@
584
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel');
585
            }
586
        }
587
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
588
            // filtering away subsets of the current language eg. en vs en-GB
589
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
590
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:altLabel');
591
            }
592
        }
593
        ksort($labels);
594
        return $labels;
595
    }