Code Duplication    Length = 15-15 lines in 2 locations

Classes/Facet/CompositeFacet.php 1 location

@@ 109-123 (lines=15) @@
106
    /**
107
     * @return array
108
     */
109
    public function getSuggestions(): array
110
    {
111
112
        $values = [];
113
        foreach ($this->suggestions as $key => $label) {
114
            $localizedLabel = $this->getLanguageService()->sL($label);
115
            if (!empty($localizedLabel)) {
116
                $label = $localizedLabel;
117
            }
118
119
            $values[] = [$key => $label];
120
        }
121
122
        return $values;
123
    }
124
125
    /**
126
     * @return LanguageService

Classes/Facet/StandardFacet.php 1 location

@@ 96-110 (lines=15) @@
93
    /**
94
     * @return array
95
     */
96
    public function getSuggestions(): array
97
    {
98
99
        $values = [];
100
        foreach ($this->suggestions as $key => $label) {
101
            $localizedLabel = $this->getLanguageService()->sL($label);
102
            if (!empty($localizedLabel)) {
103
                $label = $localizedLabel;
104
            }
105
106
            $values[] = [$key => $label];
107
        }
108
109
        return $values;
110
    }
111
112
    /**
113
     * @return LanguageService