From 027807d88699060371380c95c4ed5710f3ea0ffc Mon Sep 17 00:00:00 2001 From: Ron Chaplin Date: Thu, 18 Jul 2024 09:18:34 -0500 Subject: [PATCH] LWB-264 Fixing doc blocks for AutocompleteAttribute Trait --- .../AttributeTraits/AutocompleteAttribute.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Components/AttributeTraits/AutocompleteAttribute.php b/src/Components/AttributeTraits/AutocompleteAttribute.php index b61fda1b..458f4285 100644 --- a/src/Components/AttributeTraits/AutocompleteAttribute.php +++ b/src/Components/AttributeTraits/AutocompleteAttribute.php @@ -26,8 +26,10 @@ public function setAutocompleteAttribute(AttributeCollection &$specificAttribute { /** * Possible Values: - * - off: The browser is not allowed to automatically complete the input. Note: It can't prevent a password manager from asking the user if they want to save username and password information. - * - on: The browser is allowed to automatically complete the input with no guidance as to the type of data expected. + * - off: The browser is not allowed to automatically complete the input. Note: It can't prevent a password + * manager from asking the user if they want to save username and password information. + * - on: The browser is allowed to automatically complete the input with no guidance as to the type of data + * expected. * - : An ordered set of space-separated tokens consisting of autofill detail tokens. * * If the autocomplete attribute is , each token is the string "section-", case-insensitive, @@ -102,7 +104,9 @@ public function setAutocompleteAttribute(AttributeCollection &$specificAttribute foreach ($valueParts as $key => $valuePart) { if (str_starts_with($valuePart, 'section-') && $key !== 0) { - throw new InvalidAttributeException('The autocomplete attribute value is invalid. The section token must be the first token.'); + throw new InvalidAttributeException( + 'The autocomplete attribute value is invalid. The section token must be the first token.' + ); } elseif (! in_array($valuePart, $allowedValues) && ! str_starts_with($valuePart, 'section-')) { throw new InvalidAttributeException('The autocomplete attribute value is invalid.'); }