upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -25,7 +25,7 @@ class FileFormField extends FormField
*
* @throws \InvalidArgumentException When error code doesn't exist
*/
public function setErrorCode($error)
public function setErrorCode(int $error)
{
$codes = [\UPLOAD_ERR_INI_SIZE, \UPLOAD_ERR_FORM_SIZE, \UPLOAD_ERR_PARTIAL, \UPLOAD_ERR_NO_FILE, \UPLOAD_ERR_NO_TMP_DIR, \UPLOAD_ERR_CANT_WRITE, \UPLOAD_ERR_EXTENSION];
if (!\in_array($error, $codes)) {
@@ -37,20 +37,16 @@ class FileFormField extends FormField
/**
* Sets the value of the field.
*
* @param string $value The value of the field
*/
public function upload($value)
public function upload(?string $value)
{
$this->setValue($value);
}
/**
* Sets the value of the field.
*
* @param string|null $value The value of the field
*/
public function setValue($value)
public function setValue(?string $value)
{
if (null !== $value && is_readable($value)) {
$error = \UPLOAD_ERR_OK;
@@ -80,10 +76,8 @@ class FileFormField extends FormField
/**
* Sets path to the file as string for simulating HTTP request.
*
* @param string $path The path to the file
*/
public function setFilePath($path)
public function setFilePath(string $path)
{
parent::setValue($path);
}