Code Duplication    Length = 7-7 lines in 2 locations

model/Concept.php 2 locations

@@ 556-562 (lines=7) @@
553
    public function getForeignLabels()
554
    {
555
        $labels = array();
556
        foreach ($this->resource->allLiterals('skos:prefLabel') as $lit) {
557
            // filtering away subsets of the current language eg. en vs en-GB
558
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
559
                $labels[Punic\Language::getName($lit->getLang(), $this->getEnvLang())][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel');
560
            }
561
562
        }
563
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
564
            // filtering away subsets of the current language eg. en vs en-GB
565
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
@@ 563-569 (lines=7) @@
560
            }
561
562
        }
563
        foreach ($this->resource->allLiterals('skos:altLabel') as $lit) {
564
            // filtering away subsets of the current language eg. en vs en-GB
565
            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
566
                $labels[Punic\Language::getName($lit->getLang(), $this->getEnvLang())][] = new ConceptPropertyValueLiteral($lit, 'skos:altLabel');
567
            }
568
569
        }
570
        ksort($labels);
571
        return $labels;
572
    }