Code Duplication    Length = 13-13 lines in 2 locations

lib/Service/SearchMappingService.php 2 locations

@@ 123-135 (lines=13) @@
120
	 * @param SearchRequest $request
121
	 * @param array $arr
122
	 */
123
	private function improveSearchWildcardQueries(SearchRequest $request, &$arr) {
124
125
		$queries = $request->getWildcardQueries();
126
		foreach ($queries as $query) {
127
			$wildcards = [];
128
			foreach ($query as $entry) {
129
				$wildcards[] = ['wildcard' => $entry];
130
			}
131
132
			array_push($arr['bool']['must']['bool']['should'], $wildcards);
133
		}
134
135
	}
136
137
138
	/**
@@ 142-154 (lines=13) @@
139
	 * @param SearchRequest $request
140
	 * @param array $arr
141
	 */
142
	private function improveSearchWildcardFilters(SearchRequest $request, &$arr) {
143
144
		$filters = $request->getWildcardFilters();
145
		foreach ($filters as $filter) {
146
			$wildcards = [];
147
			foreach ($filter as $entry) {
148
				$wildcards[] = ['wildcard' => $entry];
149
			}
150
151
			$arr['bool']['filter'][]['bool']['should'] = $wildcards;
152
		}
153
154
	}
155
156
157
	/**