*/ public static function removeTaints(AddRemoveTaintsEvent $event): array { $item = $event->getExpr(); $statements_analyzer = $event->getStatementsSource(); if (!($item instanceof ArrayItem) || !($statements_analyzer instanceof StatementsAnalyzer)) { return []; } $item_key_value = ''; if ($item->key) { if ($item_key_type = $statements_analyzer->node_data->getType($item->key)) { $key_type = $item_key_type; if ($key_type->isSingleStringLiteral()) { $item_key_value = $key_type->getSingleStringLiteral()->value; } } } if ($item_key_value === 'safe_key') { return ['html']; } return []; } }