The small issue was found during automated code check
Rector v0.7.29
Config file: rector.yml
183/183 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
1 file with changes
===================
1) modules/rabbit_hole/rabbit_hole.api.php
---------- begin diff ----------
--- Original
+++ New
@@ -1,5 +1,6 @@
<?php
+use Drupal\Core\Entity\ContentEntityInterface;
/**
* @file
* Hooks provided by the Rabbit Hole module.
@@ -17,7 +18,7 @@
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity to apply rabbit hole behavior on.
*/
-function hook_rabbit_hole_values_alter(array &$values, \Drupal\Core\Entity\ContentEntityInterface $entity) {
+function hook_rabbit_hole_values_alter(array &$values, ContentEntityInterface $entity) {
// Disable bypassing access for everyone (including administrators).
$values['bypass_access'] = FALSE;
@@ -35,7 +36,7 @@
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity to apply rabbit hole behavior on.
*/
-function hook_rabbit_hole_response_alter(Response &$response, \Drupal\Core\Entity\ContentEntityInterface $entity) {
+function hook_rabbit_hole_response_alter(Response &$response, ContentEntityInterface $entity) {
if ($response instanceof RedirectResponse) {
$response = new TrustedRedirectResponse('https://example.com');
}
----------- end diff -----------