docs(avatars): note handle prefix in getWords docblock

This commit is contained in:
harsh mahajan committed 2026-09-15 11:41:58 +05:30
1 parent ce8965ba86
commit f5aaba11df
1 file changed
+2 -2
@@ -100,13 +100,13 @@ class Initials extends Photo
/**
* Words that start with a letter or digit, split on spaces — or on
* underscores when the label has none.
* underscores when the label has none. A leading @, as in a handle, is
* ignored.
*
* @return string[]
*/
private function getWords(string $name): array
{
// Handles like @walter take their initials from the name after the @
$words = \explode(' ', \ltrim(\trim($name), '@'));
// Fallback: split on underscores when there is no space