@@ -395,12 +395,12 @@ |
||
395 | 395 | public function update(Array $newConfigs) |
396 | 396 | { |
397 | 397 | $runtimeConfigs = [ |
398 | - 'core.database', // PMF_DB_Driver |
|
399 | - 'core.instance', // PMF_Instance |
|
400 | - 'core.language', // Language |
|
401 | - 'core.ldap', // PMF_Ldap |
|
402 | - 'core.ldapConfig', // $PMF_LDAP |
|
403 | - 'core.elasticsearch', // Elasticsearch\Client |
|
398 | + 'core.database', // PMF_DB_Driver |
|
399 | + 'core.instance', // PMF_Instance |
|
400 | + 'core.language', // Language |
|
401 | + 'core.ldap', // PMF_Ldap |
|
402 | + 'core.ldapConfig', // $PMF_LDAP |
|
403 | + 'core.elasticsearch', // Elasticsearch\Client |
|
404 | 404 | 'core.elasticsearchConfig' // $PMF_ES |
405 | 405 | ]; |
406 | 406 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | /** |
88 | 88 | * Creates the Elasticsearch index. |
89 | 89 | * |
90 | - * @return array |
|
90 | + * @return boolean |
|
91 | 91 | */ |
92 | 92 | public function createIndex() |
93 | 93 | { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | public function createIndex() |
93 | 93 | { |
94 | 94 | $this->client->indices()->create($this->getParams()); |
95 | - return $this->putMapping();; |
|
95 | + return $this->putMapping(); ; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | 'categories' => $faq['category_id'] |
178 | 178 | ]; |
179 | 179 | |
180 | - if ($i % 1000 == 0) { |
|
180 | + if ($i%1000 == 0) { |
|
181 | 181 | $responses = $this->client->bulk($params); |
182 | 182 | $params = ['body' => []]; |
183 | 183 | unset($responses); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'bool' => [ |
92 | 92 | 'must' => [ |
93 | 93 | [ |
94 | - 'terms' => [ 'category_id' => $this->getCategoryIds() ] |
|
94 | + 'terms' => ['category_id' => $this->getCategoryIds()] |
|
95 | 95 | ], |
96 | 96 | $languageFilter |
97 | 97 | ] |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | 'query' => [ |
101 | 101 | 'bool' => [ |
102 | 102 | 'should' => [ |
103 | - [ 'match' => [ 'question' => $searchTerm ] ], |
|
104 | - [ 'match' => [ 'answer' => $searchTerm ] ], |
|
105 | - [ 'match' => [ 'keywords' => $searchTerm ] ] |
|
103 | + ['match' => ['question' => $searchTerm]], |
|
104 | + ['match' => ['answer' => $searchTerm]], |
|
105 | + ['match' => ['keywords' => $searchTerm]] |
|
106 | 106 | ] |
107 | 107 | ] |
108 | 108 | ] |
@@ -142,7 +142,7 @@ |
||
142 | 142 | * |
143 | 143 | * @throws PMF_Search_Exception |
144 | 144 | * |
145 | - * @return array |
|
145 | + * @return resource |
|
146 | 146 | */ |
147 | 147 | public function autocomplete($searchTerm) |
148 | 148 | { |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Linkverifier Helper class for phpMyFAQ. |
|
4 | - * |
|
5 | - * PHP Version 5.5 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @author Thorsten Rinne <[email protected]> |
|
13 | - * @copyright 2012-2015 phpMyFAQ Team |
|
14 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
15 | - * @link http://www.phpmyfaq.de |
|
16 | - * @since 2012-09-03 |
|
17 | - */ |
|
3 | + * Linkverifier Helper class for phpMyFAQ. |
|
4 | + * |
|
5 | + * PHP Version 5.5 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @author Thorsten Rinne <[email protected]> |
|
13 | + * @copyright 2012-2015 phpMyFAQ Team |
|
14 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
15 | + * @link http://www.phpmyfaq.de |
|
16 | + * @since 2012-09-03 |
|
17 | + */ |
|
18 | 18 | if (!defined('IS_VALID_PHPMYFAQ')) { |
19 | 19 | exit(); |
20 | 20 | } |