From b8439a4cbb8d8b9b28dcd767dc98fe4508015bff Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 6 Jul 2021 00:26:22 +0200 Subject: [PATCH] Add type annotations for `Settings` --- src/Settings.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Settings.php b/src/Settings.php index 5cf38832..7b858096 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -38,29 +38,50 @@ private function __construct() $this->bMultibyteSupport = extension_loaded('mbstring'); } + /** + * @return self new instance + */ public static function create() { return new Settings(); } + /** + * @param bool $bMultibyteSupport + * + * @return self fluent interface + */ public function withMultibyteSupport($bMultibyteSupport = true) { $this->bMultibyteSupport = $bMultibyteSupport; return $this; } + /** + * @param string $sDefaultCharset + * + * @return self fluent interface + */ public function withDefaultCharset($sDefaultCharset) { $this->sDefaultCharset = $sDefaultCharset; return $this; } + /** + * @param bool $bLenientParsing + * + * @return self fluent interface + */ public function withLenientParsing($bLenientParsing = true) { $this->bLenientParsing = $bLenientParsing; return $this; } + /** + * @return self fluent interface + */ public function beStrict() { return $this->withLenientParsing(false);