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);