diff --git a/src/Upload_Validator.php b/src/Upload_Validator.php index 799e212f..0b6e8311 100644 --- a/src/Upload_Validator.php +++ b/src/Upload_Validator.php @@ -74,19 +74,28 @@ public function getErrors() /** * Clear out all errors + * + * @return $this */ public function clearErrors() { $this->errors = []; + + return $this; } /** * Set information about temporary file produced by PHP. + * * @param array $tmpFile + * + * @return $this */ public function setTmpFile($tmpFile) { $this->tmpFile = $tmpFile; + + return $this; } @@ -153,6 +162,8 @@ public function getAllowedMaxFileSize($ext = null) * * * @param array|int|string $rules + * + * @return $this */ public function setAllowedMaxFileSize($rules) { @@ -177,6 +188,8 @@ public function setAllowedMaxFileSize($rules) } elseif ((int)$rules > 0) { $this->allowedMaxFileSize['*'] = (int)$rules; } + + return $this; } /** @@ -195,6 +208,8 @@ public function getAllowedExtensions() * See {@link setAllowedMaxFileSize()} to limit file size by extension. * * @param array $rules List of extensions + * + * @return $this */ public function setAllowedExtensions($rules) { @@ -208,6 +223,8 @@ public function setAllowedExtensions($rules) } $this->allowedExtensions = $rules; + + return $this; } /**