diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php
index d6daa72..3b2330a 100644
--- a/core/lib/Drupal/Core/Render/theme.api.php
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -788,17 +788,24 @@ function hook_render_template($template_file, $variables) {
  * A module may implement this hook in order to alter the element type defaults
  * defined by a module.
  *
- * @param array $types
+ * @param array $info
  *   An associative array with structure identical to that of the return value
  *   of \Drupal\Core\Render\ElementInfoManagerInterface::getInfo().
  *
+ * Below snippet allows to decrease the size of textfield.
+ * @code
+ *  if (isset($info['textfield']['#size'])) {
+ *    $info['textfield']['#size'] = 40;
+ *  }
+ * @endcode
+ *
  * @see \Drupal\Core\Render\ElementInfoManager
  * @see \Drupal\Core\Render\Element\ElementInterface
  */
-function hook_element_info_alter(array &$types) {
+function hook_element_info_alter(array &$info) {
   // Decrease the default size of textfields.
-  if (isset($types['textfield']['#size'])) {
-    $types['textfield']['#size'] = 40;
+  if (isset($info['textfield']['#size'])) {
+    $info['textfield']['#size'] = 40;
   }
 }
 
