src/UploadedFile.php
protected function setError($error)
    {
        if (! is_int($error) || 0 > $error || 8 < $error) {
            throw new InvalidArgumentException(
                'Invalid error status provided; must be an UPLOAD_ERR_* constant.'
            );
        }
        $this->error = $error;
    }
protected function setError($error)
    {
        if (! is_int($error) || 0 > $error || 8 < $error) {
            throw new InvalidArgumentException(
                'Invalid error status provided; must be an UPLOAD_ERR_* constant.'
            );
        }
        $this->error = $error;
    }
protected function setError ( $ error ) { if ( ! is_int ( $ error ) || 0 > $ error || 8 < $ error ) { throw new InvalidArgumentException ( 'Invalid error status provided; must be an UPLOAD_ERR_* constant.' ) ; } $ this -> error = $ error ; }
Sets the error.

@param int $error One of PHP's UPLOAD_ERR_XXX constants

@throws \InvalidArgumentException If the received error is not one of
PHP's UPLOAD_ERR_XXX constants
Sets the error .