| @@ -68,11 +68,11 @@ | ||
| 68 | 68 |              return $this->render('jumbotron.html.twig'); | 
| 69 | 69 | } | 
| 70 | 70 |          $query = $request->query->get('q'); | 
| 71 | -        $regex = (bool)$request->query->get('regex'); | |
| 72 | -        $ignoreCase = (bool)$request->query->get('ignorecase'); | |
| 71 | +        $regex = (bool) $request->query->get('regex'); | |
| 72 | +        $ignoreCase = (bool) $request->query->get('ignorecase'); | |
| 73 | 73 | $namespaceIds = $this->parseNamespaces($request); | 
| 74 | 74 |          $titlePattern = $request->query->get('title'); | 
| 75 | -        $purgeCache = (bool)$request->query->get('purge'); | |
| 75 | +        $purgeCache = (bool) $request->query->get('purge'); | |
| 76 | 76 | |
| 77 | 77 | $ret = [ | 
| 78 | 78 | 'q' => $query, | 
| @@ -65,15 +65,15 @@ discard block | ||
| 65 | 65 | $params = $this->regex ? $this->getRegexQuery() : $this->getPlainQuery(); | 
| 66 | 66 | |
| 67 | 67 |          if (!empty($this->namespaces)) { | 
| 68 | - $params['query']['bool']['filter'][] = [ 'terms' => [ | |
| 68 | + $params['query']['bool']['filter'][] = ['terms' => [ | |
| 69 | 69 | 'namespace' => $this->namespaces, | 
| 70 | - ] ]; | |
| 70 | + ]]; | |
| 71 | 71 | } | 
| 72 | 72 | |
| 73 | 73 |          if ($this->titlePattern) { | 
| 74 | - $params['query']['bool']['filter'][] = [ 'regexp' => [ | |
| 74 | + $params['query']['bool']['filter'][] = ['regexp' => [ | |
| 75 | 75 | 'title.keyword' => $this->titlePattern, | 
| 76 | - ] ]; | |
| 76 | + ]]; | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 | return $params; | 
| @@ -92,9 +92,9 @@ discard block | ||
| 92 | 92 | 'query' => [ | 
| 93 | 93 | 'bool' => [ | 
| 94 | 94 | 'filter' => [ | 
| 95 | - [ 'match' => [ | |
| 95 | + ['match' => [ | |
| 96 | 96 | 'source_text.plain' => $this->query, | 
| 97 | - ] ], | |
| 97 | + ]], | |
| 98 | 98 | ], | 
| 99 | 99 | ], | 
| 100 | 100 | ], | 
| @@ -129,7 +129,7 @@ discard block | ||
| 129 | 129 | 'query' => [ | 
| 130 | 130 | 'bool' => [ | 
| 131 | 131 | 'filter' => [ | 
| 132 | - [ 'source_regex' => [ | |
| 132 | + ['source_regex' => [ | |
| 133 | 133 | 'regex' => $this->query, | 
| 134 | 134 | 'field' => 'source_text', | 
| 135 | 135 | 'ngram_field' => 'source_text.trigram', | 
| @@ -137,7 +137,7 @@ discard block | ||
| 137 | 137 | 'max_expand' => 10, | 
| 138 | 138 | 'case_sensitive' => !$this->ignoreCase, | 
| 139 | 139 | 'locale' => 'en', | 
| 140 | - ] ], | |
| 140 | + ]], | |
| 141 | 141 | ], | 
| 142 | 142 | ], | 
| 143 | 143 | ], |