registerArgument('content', 'string', 'Content to be trimmed'); $this->registerArgument('characters', 'string', 'Characters to be removed'); } public static function renderStatic( array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ): string { $content = $arguments['content'] ?: $renderChildrenClosure(); $characters = $arguments['characters'] ?: null; if ($characters !== null) { $content = trim($content, $characters); } else { $content = trim($content); } return $content; } }