Dep: update

주로 PHAN
This commit is contained in:
2021-08-06 22:39:09 +09:00
parent 5310c2e7f6
commit b306601c72
1098 changed files with 92137 additions and 33228 deletions
+26 -14
View File
@@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Psr7;
use InvalidArgumentException;
@@ -38,7 +39,7 @@ class UploadedFile implements UploadedFileInterface
private $error;
/**
* @var null|string
* @var string|null
*/
private $file;
@@ -59,10 +60,10 @@ class UploadedFile implements UploadedFileInterface
/**
* @param StreamInterface|string|resource $streamOrFile
* @param int $size
* @param int $errorStatus
* @param string|null $clientFilename
* @param string|null $clientMediaType
* @param int $size
* @param int $errorStatus
* @param string|null $clientFilename
* @param string|null $clientMediaType
*/
public function __construct(
$streamOrFile,
@@ -85,6 +86,7 @@ class UploadedFile implements UploadedFileInterface
* Depending on the value set file or stream variable
*
* @param mixed $streamOrFile
*
* @throws InvalidArgumentException
*/
private function setStreamOrFile($streamOrFile)
@@ -104,6 +106,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param int $error
*
* @throws InvalidArgumentException
*/
private function setError($error)
@@ -125,6 +128,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param int $size
*
* @throws InvalidArgumentException
*/
private function setSize($size)
@@ -140,7 +144,8 @@ class UploadedFile implements UploadedFileInterface
/**
* @param mixed $param
* @return boolean
*
* @return bool
*/
private function isStringOrNull($param)
{
@@ -149,7 +154,8 @@ class UploadedFile implements UploadedFileInterface
/**
* @param mixed $param
* @return boolean
*
* @return bool
*/
private function isStringNotEmpty($param)
{
@@ -158,6 +164,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param string|null $clientFilename
*
* @throws InvalidArgumentException
*/
private function setClientFilename($clientFilename)
@@ -173,6 +180,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param string|null $clientMediaType
*
* @throws InvalidArgumentException
*/
private function setClientMediaType($clientMediaType)
@@ -189,7 +197,7 @@ class UploadedFile implements UploadedFileInterface
/**
* Return true if there is no upload error
*
* @return boolean
* @return bool
*/
private function isOk()
{
@@ -197,7 +205,7 @@ class UploadedFile implements UploadedFileInterface
}
/**
* @return boolean
* @return bool
*/
public function isMoved()
{
@@ -220,6 +228,7 @@ class UploadedFile implements UploadedFileInterface
/**
* {@inheritdoc}
*
* @throws RuntimeException if the upload was not successful.
*/
public function getStream()
@@ -238,11 +247,13 @@ class UploadedFile implements UploadedFileInterface
*
* @see http://php.net/is_uploaded_file
* @see http://php.net/move_uploaded_file
*
* @param string $targetPath Path to which to move the uploaded file.
* @throws RuntimeException if the upload was not successful.
*
* @throws RuntimeException if the upload was not successful.
* @throws InvalidArgumentException if the $path specified is invalid.
* @throws RuntimeException on any error during the move operation, or on
* the second or subsequent call to the method.
* @throws RuntimeException on any error during the move operation, or on
* the second or subsequent call to the method.
*/
public function moveTo($targetPath)
{
@@ -259,7 +270,7 @@ class UploadedFile implements UploadedFileInterface
? rename($this->file, $targetPath)
: move_uploaded_file($this->file, $targetPath);
} else {
copy_to_stream(
Utils::copyToStream(
$this->getStream(),
new LazyOpenStream($targetPath, 'w')
);
@@ -288,6 +299,7 @@ class UploadedFile implements UploadedFileInterface
* {@inheritdoc}
*
* @see http://php.net/manual/en/features.file-upload.errors.php
*
* @return int One of PHP's UPLOAD_ERR_XXX constants.
*/
public function getError()
@@ -299,7 +311,7 @@ class UploadedFile implements UploadedFileInterface
* {@inheritdoc}
*
* @return string|null The filename sent by the client or null if none
* was provided.
* was provided.
*/
public function getClientFilename()
{