Verified Commit 367e25f6 authored by quietone's avatar quietone
Browse files

Issue #3483146 by nicxvan, sourav_paul, vladimiraus, mstrelan, smustgrave: Add...

Issue #3483146 by nicxvan, sourav_paul, vladimiraus, mstrelan, smustgrave: Add string return type to all hook_help implementations
parent 7488aea7
Loading
Loading
Loading
Loading
Loading
+0 −462

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class AnnouncementsFeedHooks {
   * Implements hook_help().
   */
  #[Hook('help')]
  public function help($route_name, RouteMatchInterface $route_match) {
  public function help($route_name, RouteMatchInterface $route_match): ?string {
    switch ($route_name) {
      case 'help.page.announcements_feed':
        $output = '';
@@ -35,6 +35,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
        $output .= '</dl>';
        return $output;
    }
    return NULL;
  }

  /**
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class AutomatedCronHooks {
   * Implements hook_help().
   */
  #[Hook('help')]
  public function help($route_name, RouteMatchInterface $route_match) {
  public function help($route_name, RouteMatchInterface $route_match): ?string {
    switch ($route_name) {
      case 'help.page.automated_cron':
        $output = '';
@@ -37,6 +37,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
        $output .= '</dl>';
        return $output;
    }
    return NULL;
  }

  /**
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class BanHooks {
   * Implements hook_help().
   */
  #[Hook('help')]
  public function help($route_name, RouteMatchInterface $route_match) {
  public function help($route_name, RouteMatchInterface $route_match): ?string {
    switch ($route_name) {
      case 'help.page.ban':
        $output = '';
@@ -34,6 +34,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
      case 'ban.admin_page':
        return '<p>' . $this->t('IP addresses listed here are banned from your site. Banned addresses are completely forbidden from accessing the site and instead see a brief message explaining the situation.') . '</p>';
    }
    return NULL;
  }

}
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class BasicAuthHooks {
   * Implements hook_help().
   */
  #[Hook('help')]
  public function help($route_name, RouteMatchInterface $route_match) {
  public function help($route_name, RouteMatchInterface $route_match): ?string {
    switch ($route_name) {
      case 'help.page.basic_auth':
        $output = '';
@@ -31,6 +31,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
        ]) . '</p>';
        return $output;
    }
    return NULL;
  }

}
Loading