Skip to content

Commit

Permalink
phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler committed Nov 18, 2024
1 parent 5c75f07 commit b536c0c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions search_api_pantheon.module
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* @file
*/

use Drupal\Core\Messenger\MessengerInterface;
use Drupal\search_api_pantheon\ReloadInterface;

function search_api_pantheon_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'solr_reload_core_form') {
$form['#submit'][] = 'search_api_pantheon_form_submit';
Expand All @@ -14,9 +17,9 @@ function search_api_pantheon_form_submit($form, &$form_state) {
$rl = \Drupal::service("search_api_pantheon.reload");
$messenger = \Drupal::service("messenger")->get("search_api_pantheon");
if (
!$rl instanceof \Drupal\search_api_pantheon\ReloadInterface
|| !$messenger instanceof \Drupal\Core\Messenger\MessengerInterface
) {
!$rl instanceof
ReloadInterface || !$messenger instanceof
MessengerInterface) {
$this->logger->error('Service failure. Service not found.');
return;
}
Expand Down

0 comments on commit b536c0c

Please sign in to comment.