Code Duplication    Length = 6-6 lines in 2 locations

model/Concept.php 2 locations

@@ 566-571 (lines=6) @@
563
    public function getForeignLabels()
564
    {
565
        $labels = array();
566
        foreach ($this->resource->allLiterals('skos:prefLabel') as $lit) {
567
            // filtering away subsets of the current language eg. en vs en-GB
568
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
569
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel');
570
            }
571
        }
572
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
573
            // filtering away subsets of the current language eg. en vs en-GB
574
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
@@ 572-577 (lines=6) @@
569
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel');
570
            }
571
        }
572
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
573
            // filtering away subsets of the current language eg. en vs en-GB
574
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
575
                $labels[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, 'skos:altLabel');
576
            }
577
        }
578
        ksort($labels);
579
        return $labels;
580
    }