Skip to content

Commit fc9131c

Browse files
Issue #2867118 by drunken monkey: Fixed reported coding standards problems.
1 parent c8faf2b commit fc9131c

File tree

8 files changed

+57
-13
lines changed

8 files changed

+57
-13
lines changed

Diff for: CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Search API 1.x, dev (xxxx-xx-xx):
22
---------------------------------
3+
- #2867118 by drunken monkey: Fixed reported coding standards problems.
34
- #2839932 by drunken monkey, borisson_, bmcclure, jacktonkin: Fixed Views
45
problems with "Rendered item" fields.
56
- #2765317 by vasike: Added a "Last" aggregation for aggregated fields.

Diff for: js/search_api.processors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
(function ($) {
77

8-
"use strict";
8+
'use strict';
99

1010
Drupal.behaviors.searchApiProcessor = {
1111
attach: function (context, settings) {

Diff for: modules/search_api_db/search_api_db_defaults/tests/src/Functional/IntegrationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testInstallAndDefaultSetupWorking() {
6161
\Drupal::state()->set('search_api_use_tracking_batch', FALSE);
6262

6363
// Install the search_api_db_defaults module.
64-
if (version_compare(\Drupal::VERSION, '8.3', '>=')){
64+
if (version_compare(\Drupal::VERSION, '8.3', '>=')) {
6565
$edit_enable = [
6666
'modules[search_api_db_defaults][enable]' => TRUE,
6767
];

Diff for: modules/search_api_db/src/Plugin/search_api/backend/Database.php

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use Drupal\search_api\Query\QueryInterface;
2929
use Drupal\search_api\SearchApiException;
3030
use Drupal\search_api\Utility\DataTypeHelper;
31-
use Drupal\search_api\Utility\Utility;
3231
use Drupal\search_api_autocomplete\Entity\SearchApiAutocompleteSearch;
3332
use Drupal\search_api_autocomplete\Suggestion;
3433
use Drupal\search_api_db\DatabaseCompatibility\DatabaseCompatibilityHandlerInterface;

Diff for: src/Form/IndexForm.php

+38-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Drupal\Core\Utility\Error;
1212
use Drupal\search_api\IndexInterface;
1313
use Drupal\search_api\SearchApiException;
14-
use Drupal\search_api\Tracker\TrackerPluginManager;
1514
use Drupal\search_api\Utility\PluginHelperInterface;
1615
use Symfony\Component\DependencyInjection\ContainerInterface;
1716

@@ -118,6 +117,10 @@ public function form(array $form, FormStateInterface $form_state) {
118117
/**
119118
* Builds the form for the basic index properties.
120119
*
120+
* @param array $form
121+
* The current form array.
122+
* @param \Drupal\Core\Form\FormStateInterface $form_state
123+
* The current form state.
121124
* @param \Drupal\search_api\IndexInterface $index
122125
* The index that is being created or edited.
123126
*/
@@ -306,6 +309,10 @@ public function buildEntityForm(array &$form, FormStateInterface $form_state, In
306309
/**
307310
* Builds the configuration forms for all selected datasources.
308311
*
312+
* @param array $form
313+
* The current form array.
314+
* @param \Drupal\Core\Form\FormStateInterface $form_state
315+
* The current form state.
309316
* @param \Drupal\search_api\IndexInterface $index
310317
* The index being created or edited.
311318
*/
@@ -352,6 +359,10 @@ public function buildDatasourcesConfigForm(array &$form, FormStateInterface $for
352359
/**
353360
* Builds the tracker configuration form.
354361
*
362+
* @param array $form
363+
* The current form array.
364+
* @param \Drupal\Core\Form\FormStateInterface $form_state
365+
* The current form state.
355366
* @param \Drupal\search_api\IndexInterface $index
356367
* The index being created or edited.
357368
*/
@@ -404,6 +415,11 @@ public function buildTrackerConfigForm(array &$form, FormStateInterface $form_st
404415
* Form submission handler for buildEntityForm().
405416
*
406417
* Takes care of changes in the selected datasources.
418+
*
419+
* @param array $form
420+
* The current form array.
421+
* @param \Drupal\Core\Form\FormStateInterface $form_state
422+
* The current form state.
407423
*/
408424
public function submitAjaxDatasourceConfigForm($form, FormStateInterface $form_state) {
409425
$form_state->setValue('id', NULL);
@@ -412,6 +428,14 @@ public function submitAjaxDatasourceConfigForm($form, FormStateInterface $form_s
412428

413429
/**
414430
* Handles changes to the selected datasources.
431+
*
432+
* @param array $form
433+
* The current form array.
434+
* @param \Drupal\Core\Form\FormStateInterface $form_state
435+
* The current form state.
436+
*
437+
* @return array
438+
* The part of the form to return as AJAX.
415439
*/
416440
public function buildAjaxDatasourceConfigForm(array $form, FormStateInterface $form_state) {
417441
return $form['datasource_configs'];
@@ -421,6 +445,11 @@ public function buildAjaxDatasourceConfigForm(array $form, FormStateInterface $f
421445
* Form submission handler for buildEntityForm().
422446
*
423447
* Takes care of changes in the selected tracker plugin.
448+
*
449+
* @param array $form
450+
* The current form array.
451+
* @param \Drupal\Core\Form\FormStateInterface $form_state
452+
* The current form state.
424453
*/
425454
public function submitAjaxTrackerConfigForm(array $form, FormStateInterface $form_state) {
426455
$form_state->setValue('id', NULL);
@@ -429,6 +458,14 @@ public function submitAjaxTrackerConfigForm(array $form, FormStateInterface $for
429458

430459
/**
431460
* Handles switching the selected tracker plugin.
461+
*
462+
* @param array $form
463+
* The current form array.
464+
* @param \Drupal\Core\Form\FormStateInterface $form_state
465+
* The current form state.
466+
*
467+
* @return array
468+
* The part of the form to return as AJAX.
432469
*/
433470
public function buildAjaxTrackerConfigForm(array $form, FormStateInterface $form_state) {
434471
return $form['tracker_config'];

Diff for: src/Form/ServerForm.php

+16-7
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ public function form(array $form, FormStateInterface $form_state) {
9494
/**
9595
* Builds the form for the basic server properties.
9696
*
97+
* @param array $form
98+
* The current form array.
99+
* @param \Drupal\Core\Form\FormStateInterface $form_state
100+
* The current form state.
97101
* @param \Drupal\search_api\ServerInterface $server
98102
* The server that is being created or edited.
99103
*/
@@ -173,6 +177,10 @@ public function buildEntityForm(array &$form, FormStateInterface $form_state, Se
173177
/**
174178
* Builds the backend-specific configuration form.
175179
*
180+
* @param array $form
181+
* The current form array.
182+
* @param \Drupal\Core\Form\FormStateInterface $form_state
183+
* The current form state.
176184
* @param \Drupal\search_api\ServerInterface $server
177185
* The server that is being created or edited.
178186
*/
@@ -210,6 +218,14 @@ public function buildBackendConfigForm(array &$form, FormStateInterface $form_st
210218

211219
/**
212220
* Handles switching the selected backend plugin.
221+
*
222+
* @param array $form
223+
* The current form array.
224+
* @param \Drupal\Core\Form\FormStateInterface $form_state
225+
* The current form state.
226+
*
227+
* @return array
228+
* The part of the form to return as AJAX.
213229
*/
214230
public static function buildAjaxBackendConfigForm(array $form, FormStateInterface $form_state) {
215231
// The work is already done in form(), where we rebuild the entity according
@@ -296,11 +312,4 @@ public function save(array $form, FormStateInterface $form_state) {
296312
}
297313
}
298314

299-
/**
300-
* {@inheritdoc}
301-
*/
302-
public function delete(array $form, FormStateInterface $form_state) {
303-
$form_state->setRedirect('search_api.server_delete', array('search_api_server' => $this->getEntity()->id()));
304-
}
305-
306315
}

Diff for: src/Plugin/search_api/processor/Highlight.php

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Drupal\search_api\Query\QueryInterface;
1313
use Drupal\search_api\Query\ResultSetInterface;
1414
use Drupal\search_api\Utility\DataTypeHelperInterface;
15-
use Drupal\search_api\Utility\Utility;
1615

1716
/**
1817
* Adds a highlighted excerpt to results and highlights returned fields.

Diff for: tests/search_api_test_hooks/search_api_test_hooks.search_api.inc

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use Drupal\search_api\IndexInterface;
99
use Drupal\search_api\Query\QueryInterface;
1010
use Drupal\search_api\Query\ResultSetInterface;
1111
use Drupal\search_api\ServerInterface;
12-
use Drupal\search_api\Utility\Utility;
1312

1413
/**
1514
* Implements hook_search_api_backend_info_alter().

0 commit comments

Comments
 (0)