diff --git a/core/lib/Drupal/Core/Render/Element/Date.php b/core/lib/Drupal/Core/Render/Element/Date.php index 607d243..2c96fff 100644 --- a/core/lib/Drupal/Core/Render/Element/Date.php +++ b/core/lib/Drupal/Core/Render/Element/Date.php @@ -27,17 +27,13 @@ class Date extends FormElement { */ public function getInfo() { $class = get_class($this); - return array( + return [ '#input' => TRUE, '#theme' => 'input__date', - '#process' => array( - array($class, 'processDate'), - ), - '#pre_render' => array( - array($class, 'preRenderDate'), - ), - '#theme_wrappers' => array('form_element'), - ); + '#process' => [[$class, 'processDate']], + '#pre_render' => [[$class, 'preRenderDate']], + '#theme_wrappers' => ['form_element'], + ]; } /** @@ -60,7 +56,7 @@ public static function processDate(&$element, FormStateInterface $form_state, &$ // Attach JS support, if we can determine which date format should be used. if ($element['#attributes']['type'] == 'date' && !empty($element['#date_date_format'])) { $element['#attached']['library'][] = 'core/drupal.date'; - $element['#attributes']['data-drupal-date-format'] = array($element['#date_date_format']); + $element['#attributes']['data-drupal-date-format'] = [$element['#date_date_format']]; } return $element; }