core/lib/Drupal/Core/Session/AccountSetEvent.php | 6 +++--- .../Field/FieldWidget/DateTimeDefaultWidget.php | 2 +- core/modules/system/src/TimeZoneResolver.php | 24 +++++++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/lib/Drupal/Core/Session/AccountSetEvent.php b/core/lib/Drupal/Core/Session/AccountSetEvent.php index 3325f7b..ea05faa 100644 --- a/core/lib/Drupal/Core/Session/AccountSetEvent.php +++ b/core/lib/Drupal/Core/Session/AccountSetEvent.php @@ -5,7 +5,7 @@ use Symfony\Component\EventDispatcher\Event; /** - * Wraps a configuration event for event listeners. + * Event fired when an account is set for the current session. */ class AccountSetEvent extends Event { @@ -27,10 +27,10 @@ public function __construct(AccountInterface $account) { } /** - * Gets the Account. + * Gets the account. * * @return \Drupal\Core\Session\AccountInterface - * The Account. + * The account. */ public function getAccount() { return $this->account; diff --git a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php index 5dd3e52..2a4ffcd 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php +++ b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php @@ -3,8 +3,8 @@ namespace Drupal\datetime\Plugin\Field\FieldWidget; use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem; diff --git a/core/modules/system/src/TimeZoneResolver.php b/core/modules/system/src/TimeZoneResolver.php index 9294fbe..5387500 100644 --- a/core/modules/system/src/TimeZoneResolver.php +++ b/core/modules/system/src/TimeZoneResolver.php @@ -27,31 +27,31 @@ class TimeZoneResolver implements EventSubscriberInterface { protected $configFactory; /** - * Current user. + * The current user. * - * @var \Drupal\user\Plugin\views\argument_default\CurrentUser + * @var \Drupal\Core\Session\AccountInterface */ private $currentUser; /** * TimeZoneResolver constructor. * - * @param \Drupal\Core\Session\AccountInterface $currentUser - * Current user. - * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory + * @param \Drupal\Core\Session\AccountInterface $current_user + * The current user. + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(AccountInterface $currentUser, ConfigFactoryInterface $configFactory) { - $this->configFactory = $configFactory; - $this->currentUser = $currentUser; + public function __construct(AccountInterface $current_user, ConfigFactoryInterface $config_factory) { + $this->configFactory = $config_factory; + $this->currentUser = $current_user; } /** * Sets the default time zone. */ public function setDefaultTimeZone() { - if ($timeZone = $this->getTimeZone()) { - date_default_timezone_set($timeZone); + if ($time_zone = $this->getTimeZone()) { + date_default_timezone_set($time_zone); } } @@ -91,8 +91,8 @@ protected function getTimeZone() { if ($config->get('timezone.user.configurable') && $this->currentUser->isAuthenticated() && $this->currentUser->getTimezone()) { return $this->currentUser->getTimeZone(); } - elseif ($defaultTimeZone = $config->get('timezone.default')) { - return $defaultTimeZone; + elseif ($default_timezone = $config->get('timezone.default')) { + return $default_timezone; } return NULL; }