diff --git a/search_api.api.php b/search_api.api.php
index b77d344b..5739b37e 100644
--- a/search_api.api.php
+++ b/search_api.api.php
@@ -271,7 +271,7 @@ function hook_search_api_items_indexed(\Drupal\search_api\IndexInterface $index,
  * @param \Drupal\search_api\Query\QueryInterface $query
  *   The query that will be executed.
  */
-function hook_search_api_query_alter(\Drupal\search_api\Query\QueryInterface &$query) {
+function hook_search_api_query_alter(\Drupal\search_api\Query\QueryInterface $query) {
   // Do not run for queries with a certain tag.
   if ($query->hasTag('example_tag')) {
     return;
@@ -295,7 +295,7 @@ function hook_search_api_query_alter(\Drupal\search_api\Query\QueryInterface &$q
  * @param \Drupal\search_api\Query\QueryInterface $query
  *   The query that will be executed.
  */
-function hook_search_api_query_TAG_alter(\Drupal\search_api\Query\QueryInterface &$query) {
+function hook_search_api_query_TAG_alter(\Drupal\search_api\Query\QueryInterface $query) {
   // Exclude the node with ID 10 from the search results.
   $fields = $query->getIndex()->getFields();
   foreach ($query->getIndex()->getDatasources() as $datasource_id => $datasource) {
@@ -316,7 +316,7 @@ function hook_search_api_query_TAG_alter(\Drupal\search_api\Query\QueryInterface
  * @param \Drupal\search_api\Query\ResultSetInterface $results
  *   The search results to alter.
  */
-function hook_search_api_results_alter(\Drupal\search_api\Query\ResultSetInterface &$results) {
+function hook_search_api_results_alter(\Drupal\search_api\Query\ResultSetInterface $results) {
   $results->setExtraData('example_hook_invoked', microtime(TRUE));
 }
 
@@ -329,7 +329,7 @@ function hook_search_api_results_alter(\Drupal\search_api\Query\ResultSetInterfa
  * @param \Drupal\search_api\Query\ResultSetInterface $results
  *   The search results to alter.
  */
-function hook_search_api_results_TAG_alter(\Drupal\search_api\Query\ResultSetInterface &$results) {
+function hook_search_api_results_TAG_alter(\Drupal\search_api\Query\ResultSetInterface $results) {
   $results->setExtraData('example_hook_invoked', microtime(TRUE));
 }
 
diff --git a/tests/search_api_test_hooks/search_api_test_hooks.module b/tests/search_api_test_hooks/search_api_test_hooks.module
index 750afb67..feddef93 100644
--- a/tests/search_api_test_hooks/search_api_test_hooks.module
+++ b/tests/search_api_test_hooks/search_api_test_hooks.module
@@ -12,7 +12,7 @@ use Drupal\search_api\Utility\Utility;
 /**
  * Implements hook_search_api_query_TAG_alter().
  */
-function search_api_test_hooks_search_api_query_andrew_hill_alter(QueryInterface &$query) {
+function search_api_test_hooks_search_api_query_andrew_hill_alter(QueryInterface $query) {
   \Drupal::messenger()->addStatus("Freeland");
   // Exclude the node with ID 2 from the search results.
   $query->setOption('tag query alter hook', TRUE);
@@ -31,6 +31,6 @@ function search_api_test_hooks_search_api_query_andrew_hill_alter(QueryInterface
 /**
  * Implements hook_search_api_results_TAG_alter().
  */
-function search_api_test_hooks_search_api_results_andrew_hill_alter(ResultSetInterface &$results) {
+function search_api_test_hooks_search_api_results_andrew_hill_alter(ResultSetInterface $results) {
   \Drupal::messenger()->addStatus('Llama');
 }
diff --git a/tests/search_api_test_hooks/search_api_test_hooks.search_api.inc b/tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
index e9daf171..a48aa041 100644
--- a/tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
+++ b/tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
@@ -83,7 +83,7 @@ function search_api_test_hooks_search_api_items_indexed(IndexInterface $index, a
 /**
  * Implements hook_search_api_query_alter().
  */
-function search_api_test_hooks_search_api_query_alter(QueryInterface &$query) {
+function search_api_test_hooks_search_api_query_alter(QueryInterface $query) {
   \Drupal::messenger()->addStatus('Funky blue note');
   \Drupal::messenger()->addStatus("Search id: {$query->getSearchId(FALSE)}");
   $query->addTag('andrew_hill');
@@ -92,7 +92,7 @@ function search_api_test_hooks_search_api_query_alter(QueryInterface &$query) {
 /**
  * Implements hook_search_api_results_alter().
  */
-function search_api_test_hooks_search_api_results_alter(ResultSetInterface &$results) {
+function search_api_test_hooks_search_api_results_alter(ResultSetInterface $results) {
   \Drupal::messenger()->addStatus('Stepping into tomorrow');
 }
 
