Code Duplication    Length = 6-6 lines in 2 locations

model/Concept.php 2 locations

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