fix(security): narrow the relative-URL sanitiser's attribute list type

phpstan flagged the nullable return that never returns null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Paul LütznerandClaude Opus 5.5 committed 2026-09-23 19:37:16 +02:00
1 parent 4611242536
commit d3eb835a47
1 file changed
+4 -1
@@ -33,7 +33,10 @@ final class RelativeUrlAttributeSanitizer implements AttributeSanitizerInterface
return null;
}
public function getSupportedAttributes(): ?array
/**
* @return list<string>
*/
public function getSupportedAttributes(): array
{
return ['src', 'href', 'background', 'lowsrc', 'poster', 'style'];
}