Commit 1acd6884 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #3219111 by johnv: Clean code - office_hours.api.php Class usage

parent 698efbd3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
 */

use Drupal\Core\Entity\EntityInterface;
use Drupal\user\EntityOwnerInterface;

/**
 * @addtogroup hooks
@@ -39,7 +40,7 @@ function hook_office_hours_current_time_alter(int &$time, EntityInterface $entit
  // Each city has a timezone attached.
  //
  // Adjust content time to content owner's timezone.
  if ($entity instanceof \Drupal\user\EntityOwnerInterface
  if ($entity instanceof EntityOwnerInterface
    && ($account = $entity->getOwner())
    && ($account->isAuthenticated())
  ) {