From 501ad6c72d93937c20034cb150c92ab45627d998 Mon Sep 17 00:00:00 2001 From: Hendrik Tervooren Date: Fri, 19 Jun 2020 14:17:25 +0200 Subject: [PATCH] changed null to string --- src/StringParser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/StringParser.php b/src/StringParser.php index 0972cc5..50f2ffc 100644 --- a/src/StringParser.php +++ b/src/StringParser.php @@ -35,7 +35,7 @@ public function defaultsTo($defaultValue) * @param string $invalidValueMessage * @param string $notFoundMessage * - * @return null + * @return string */ public function required($invalidValueMessage = null, $notFoundMessage = null) { @@ -51,7 +51,7 @@ public function defaultsToIfEmpty($defaultValue) if ($this->value === '') { return $defaultValue; } - + return $this->defaultsTo($defaultValue); } @@ -74,7 +74,7 @@ public function leftTrim() { return new TrimParser($this->config, $this->name, $this->value, TrimParser::LEFT_TRIM); } - + public function rightTrim() { return new TrimParser($this->config, $this->name, $this->value, TrimParser::RIGHT_TRIM);