fix:修复BUG/升级1.1.6版本
This commit is contained in:
16
vendor/psr/http-message/src/MessageInterface.php
vendored
16
vendor/psr/http-message/src/MessageInterface.php
vendored
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -38,7 +40,7 @@ interface MessageInterface
|
||||
* @param string $version HTTP protocol version
|
||||
* @return static
|
||||
*/
|
||||
public function withProtocolVersion($version);
|
||||
public function withProtocolVersion(string $version);
|
||||
|
||||
/**
|
||||
* Retrieves all message header values.
|
||||
@@ -75,7 +77,7 @@ interface MessageInterface
|
||||
* name using a case-insensitive string comparison. Returns false if
|
||||
* no matching header name is found in the message.
|
||||
*/
|
||||
public function hasHeader($name);
|
||||
public function hasHeader(string $name);
|
||||
|
||||
/**
|
||||
* Retrieves a message header value by the given case-insensitive name.
|
||||
@@ -91,7 +93,7 @@ interface MessageInterface
|
||||
* header. If the header does not appear in the message, this method MUST
|
||||
* return an empty array.
|
||||
*/
|
||||
public function getHeader($name);
|
||||
public function getHeader(string $name);
|
||||
|
||||
/**
|
||||
* Retrieves a comma-separated string of the values for a single header.
|
||||
@@ -112,7 +114,7 @@ interface MessageInterface
|
||||
* concatenated together using a comma. If the header does not appear in
|
||||
* the message, this method MUST return an empty string.
|
||||
*/
|
||||
public function getHeaderLine($name);
|
||||
public function getHeaderLine(string $name);
|
||||
|
||||
/**
|
||||
* Return an instance with the provided value replacing the specified header.
|
||||
@@ -129,7 +131,7 @@ interface MessageInterface
|
||||
* @return static
|
||||
* @throws \InvalidArgumentException for invalid header names or values.
|
||||
*/
|
||||
public function withHeader($name, $value);
|
||||
public function withHeader(string $name, $value);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified header appended with the given value.
|
||||
@@ -147,7 +149,7 @@ interface MessageInterface
|
||||
* @return static
|
||||
* @throws \InvalidArgumentException for invalid header names or values.
|
||||
*/
|
||||
public function withAddedHeader($name, $value);
|
||||
public function withAddedHeader(string $name, $value);
|
||||
|
||||
/**
|
||||
* Return an instance without the specified header.
|
||||
@@ -161,7 +163,7 @@ interface MessageInterface
|
||||
* @param string $name Case-insensitive header field name to remove.
|
||||
* @return static
|
||||
*/
|
||||
public function withoutHeader($name);
|
||||
public function withoutHeader(string $name);
|
||||
|
||||
/**
|
||||
* Gets the body of the message.
|
||||
|
||||
10
vendor/psr/http-message/src/RequestInterface.php
vendored
10
vendor/psr/http-message/src/RequestInterface.php
vendored
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -55,10 +57,10 @@ interface RequestInterface extends MessageInterface
|
||||
*
|
||||
* @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
|
||||
* request-target forms allowed in request messages)
|
||||
* @param mixed $requestTarget
|
||||
* @param string $requestTarget
|
||||
* @return static
|
||||
*/
|
||||
public function withRequestTarget($requestTarget);
|
||||
public function withRequestTarget(string $requestTarget);
|
||||
|
||||
/**
|
||||
* Retrieves the HTTP method of the request.
|
||||
@@ -82,7 +84,7 @@ interface RequestInterface extends MessageInterface
|
||||
* @return static
|
||||
* @throws \InvalidArgumentException for invalid HTTP methods.
|
||||
*/
|
||||
public function withMethod($method);
|
||||
public function withMethod(string $method);
|
||||
|
||||
/**
|
||||
* Retrieves the URI instance.
|
||||
@@ -125,5 +127,5 @@ interface RequestInterface extends MessageInterface
|
||||
* @param bool $preserveHost Preserve the original state of the Host header.
|
||||
* @return static
|
||||
*/
|
||||
public function withUri(UriInterface $uri, $preserveHost = false);
|
||||
public function withUri(UriInterface $uri, bool $preserveHost = false);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -49,7 +51,7 @@ interface ResponseInterface extends MessageInterface
|
||||
* @return static
|
||||
* @throws \InvalidArgumentException For invalid status code arguments.
|
||||
*/
|
||||
public function withStatus($code, $reasonPhrase = '');
|
||||
public function withStatus(int $code, string $reasonPhrase = '');
|
||||
|
||||
/**
|
||||
* Gets the response reason phrase associated with the status code.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -224,7 +226,7 @@ interface ServerRequestInterface extends RequestInterface
|
||||
* @param mixed $default Default value to return if the attribute does not exist.
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAttribute($name, $default = null);
|
||||
public function getAttribute(string $name, $default = null);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified derived request attribute.
|
||||
@@ -241,7 +243,7 @@ interface ServerRequestInterface extends RequestInterface
|
||||
* @param mixed $value The value of the attribute.
|
||||
* @return static
|
||||
*/
|
||||
public function withAttribute($name, $value);
|
||||
public function withAttribute(string $name, $value);
|
||||
|
||||
/**
|
||||
* Return an instance that removes the specified derived request attribute.
|
||||
@@ -257,5 +259,5 @@ interface ServerRequestInterface extends RequestInterface
|
||||
* @param string $name The attribute name.
|
||||
* @return static
|
||||
*/
|
||||
public function withoutAttribute($name);
|
||||
public function withoutAttribute(string $name);
|
||||
}
|
||||
|
||||
12
vendor/psr/http-message/src/StreamInterface.php
vendored
12
vendor/psr/http-message/src/StreamInterface.php
vendored
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -84,7 +86,7 @@ interface StreamInterface
|
||||
* SEEK_END: Set position to end-of-stream plus offset.
|
||||
* @throws \RuntimeException on failure.
|
||||
*/
|
||||
public function seek($offset, $whence = SEEK_SET);
|
||||
public function seek(int $offset, int $whence = SEEK_SET);
|
||||
|
||||
/**
|
||||
* Seek to the beginning of the stream.
|
||||
@@ -112,7 +114,7 @@ interface StreamInterface
|
||||
* @return int Returns the number of bytes written to the stream.
|
||||
* @throws \RuntimeException on failure.
|
||||
*/
|
||||
public function write($string);
|
||||
public function write(string $string);
|
||||
|
||||
/**
|
||||
* Returns whether or not the stream is readable.
|
||||
@@ -131,7 +133,7 @@ interface StreamInterface
|
||||
* if no bytes are available.
|
||||
* @throws \RuntimeException if an error occurs.
|
||||
*/
|
||||
public function read($length);
|
||||
public function read(int $length);
|
||||
|
||||
/**
|
||||
* Returns the remaining contents in a string
|
||||
@@ -149,10 +151,10 @@ interface StreamInterface
|
||||
* stream_get_meta_data() function.
|
||||
*
|
||||
* @link http://php.net/manual/en/function.stream-get-meta-data.php
|
||||
* @param string $key Specific metadata to retrieve.
|
||||
* @param string|null $key Specific metadata to retrieve.
|
||||
* @return array|mixed|null Returns an associative array if no key is
|
||||
* provided. Returns a specific key value if a key is provided and the
|
||||
* value is found, or null if the key is not found.
|
||||
*/
|
||||
public function getMetadata($key = null);
|
||||
public function getMetadata(?string $key = null);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -62,7 +64,7 @@ interface UploadedFileInterface
|
||||
* @throws \RuntimeException on any error during the move operation, or on
|
||||
* the second or subsequent call to the method.
|
||||
*/
|
||||
public function moveTo($targetPath);
|
||||
public function moveTo(string $targetPath);
|
||||
|
||||
/**
|
||||
* Retrieve the file size.
|
||||
|
||||
17
vendor/psr/http-message/src/UriInterface.php
vendored
17
vendor/psr/http-message/src/UriInterface.php
vendored
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Psr\Http\Message;
|
||||
|
||||
/**
|
||||
@@ -188,7 +191,7 @@ interface UriInterface
|
||||
* @return static A new instance with the specified scheme.
|
||||
* @throws \InvalidArgumentException for invalid or unsupported schemes.
|
||||
*/
|
||||
public function withScheme($scheme);
|
||||
public function withScheme(string $scheme);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified user information.
|
||||
@@ -204,7 +207,7 @@ interface UriInterface
|
||||
* @param null|string $password The password associated with $user.
|
||||
* @return static A new instance with the specified user information.
|
||||
*/
|
||||
public function withUserInfo($user, $password = null);
|
||||
public function withUserInfo(string $user, ?string $password = null);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified host.
|
||||
@@ -218,7 +221,7 @@ interface UriInterface
|
||||
* @return static A new instance with the specified host.
|
||||
* @throws \InvalidArgumentException for invalid hostnames.
|
||||
*/
|
||||
public function withHost($host);
|
||||
public function withHost(string $host);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified port.
|
||||
@@ -237,7 +240,7 @@ interface UriInterface
|
||||
* @return static A new instance with the specified port.
|
||||
* @throws \InvalidArgumentException for invalid ports.
|
||||
*/
|
||||
public function withPort($port);
|
||||
public function withPort(?int $port);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified path.
|
||||
@@ -261,7 +264,7 @@ interface UriInterface
|
||||
* @return static A new instance with the specified path.
|
||||
* @throws \InvalidArgumentException for invalid paths.
|
||||
*/
|
||||
public function withPath($path);
|
||||
public function withPath(string $path);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified query string.
|
||||
@@ -278,7 +281,7 @@ interface UriInterface
|
||||
* @return static A new instance with the specified query string.
|
||||
* @throws \InvalidArgumentException for invalid query strings.
|
||||
*/
|
||||
public function withQuery($query);
|
||||
public function withQuery(string $query);
|
||||
|
||||
/**
|
||||
* Return an instance with the specified URI fragment.
|
||||
@@ -294,7 +297,7 @@ interface UriInterface
|
||||
* @param string $fragment The fragment to use with the new instance.
|
||||
* @return static A new instance with the specified fragment.
|
||||
*/
|
||||
public function withFragment($fragment);
|
||||
public function withFragment(string $fragment);
|
||||
|
||||
/**
|
||||
* Return the string representation as a URI reference.
|
||||
|
||||
Reference in New Issue
Block a user