Code Duplication    Length = 13-13 lines in 2 locations

lib/Service/SearchMappingService.php 2 locations

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