diff -u b/modules/redirect_404/src/EventSubscriber/Redirect404Subscriber.php b/modules/redirect_404/src/EventSubscriber/Redirect404Subscriber.php --- b/modules/redirect_404/src/EventSubscriber/Redirect404Subscriber.php +++ b/modules/redirect_404/src/EventSubscriber/Redirect404Subscriber.php @@ -4,7 +4,7 @@ use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Path\CurrentPathStack; -use Drupal\redirect_404\RedirectNotFoundStorage; +use Drupal\redirect_404\RedirectNotFoundStorageInterface; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\KernelEvents; @@ -32,7 +32,7 @@ /** * The redirect storage. * - * @var \Drupal\redirect_404\RedirectNotFoundStorage + * @var \Drupal\redirect_404\RedirectNotFoundStorageInterface */ protected $redirectStorage; @@ -43,10 +43,10 @@ * The current path. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. - * @param \Drupal\redirect_404\RedirectNotFoundStorage $redirect_storage + * @param \Drupal\redirect_404\RedirectNotFoundStorageInterface $redirect_storage * A redirect storage. */ - public function __construct(CurrentPathStack $current_path, LanguageManagerInterface $language_manager, RedirectNotFoundStorage $redirect_storage) { + public function __construct(CurrentPathStack $current_path, LanguageManagerInterface $language_manager, RedirectNotFoundStorageInterface $redirect_storage) { $this->currentPath = $current_path; $this->languageManager = $language_manager; $this->redirectStorage = $redirect_storage; diff -u b/modules/redirect_404/src/RedirectNotFoundStorage.php b/modules/redirect_404/src/RedirectNotFoundStorage.php --- b/modules/redirect_404/src/RedirectNotFoundStorage.php +++ b/modules/redirect_404/src/RedirectNotFoundStorage.php @@ -7,7 +7,7 @@ /** * Controller class for redirect not found storage. */ -class RedirectNotFoundStorage { +class RedirectNotFoundStorage implements RedirectNotFoundStorageInterface { /** * Active database connection. @@ -27,12 +27,7 @@ } /** - * Merges a record to the redirect_404 table. - * - * @param string $path - * The path of the current request. - * @param string $langcode - * The ID of the language code. + * {@inheritdoc} */ public function logRequest($path, $langcode) { $this->database->merge('redirect_404') @@ -48,12 +43,7 @@ } /** - * Marks a record as resolved in the redirect_404 table. - * - * @param string $path - * The path of the current request. - * @param string $langcode - * The ID of the language code. + * {@inheritdoc} */ public function resolveLogRequest($path, $langcode) { $this->database->update('redirect_404') @@ -64,20 +54,7 @@ } /** - * Returns the 404 request data. - * - * @param array $header - * An array containing arrays of the redirect_404 fields data. - * @param string $search - * The search text. - * - * @return array - * A list of objects with the properties: - * - path - * - count - * - timestamp - * - langcode - * - resolved + * {@inheritdoc} */ public function listRequests(array $header = [], $search = NULL) { $query = $this->database only in patch2: unchanged: --- /dev/null +++ b/modules/redirect_404/src/RedirectNotFoundStorageInterface.php @@ -0,0 +1,48 @@ +