Passed
Push — master ( f41cae...77f343 )
by
unknown
04:46
created
src/Controller/DefaultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Model/Query.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
137 137
                             'max_expand' => 10,
138 138
                             'case_sensitive' => !$this->ignoreCase,
139 139
                             'locale' => 'en',
140
-                        ] ],
140
+                        ]],
141 141
                     ],
142 142
                 ],
143 143
             ],
Please login to merge, or discard this patch.