diff --git a/composer.json b/composer.json index bdd502d..b8ac7fc 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "require": { "php": ">=7.1", "ext-dom": "*", + "ext-intl": "*", "masterminds/html5": "^2.4", "psr/log": "^1.0", "league/uri-parser": "^1.4.1" diff --git a/src/SanitizerBuilder.php b/src/SanitizerBuilder.php index ac05116..952bb77 100644 --- a/src/SanitizerBuilder.php +++ b/src/SanitizerBuilder.php @@ -42,16 +42,22 @@ class SanitizerBuilder implements SanitizerBuilderInterface public function registerExtension(ExtensionInterface $extension) { $this->extensions[$extension->getName()] = $extension; + + return $this; } public function setParser(?ParserInterface $parser) { $this->parser = $parser; + + return $this; } public function setLogger(?LoggerInterface $logger) { $this->logger = $logger; + + return $this; } public function build(array $config): SanitizerInterface diff --git a/src/SanitizerBuilderInterface.php b/src/SanitizerBuilderInterface.php index 8e035f1..987bbe7 100644 --- a/src/SanitizerBuilderInterface.php +++ b/src/SanitizerBuilderInterface.php @@ -24,6 +24,8 @@ interface SanitizerBuilderInterface * Register an extension to use in the sanitizer being built. * * @param ExtensionInterface $extension + * + * @return SanitizerBuilderInterface */ public function registerExtension(ExtensionInterface $extension);