summaryrefslogtreecommitdiffstats
path: root/vendor/guzzlehttp/psr7/src/Uri.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/guzzlehttp/psr7/src/Uri.php')
-rw-r--r--vendor/guzzlehttp/psr7/src/Uri.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php
index fbba7f1..f1feee8 100644
--- a/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/vendor/guzzlehttp/psr7/src/Uri.php
@@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable
/**
* Unreserved characters for use in a regex.
*
- * @see https://tools.ietf.org/html/rfc3986#section-2.3
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
*/
private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
/**
* Sub-delims for use in a regex.
*
- * @see https://tools.ietf.org/html/rfc3986#section-2.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
*/
private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26'];
@@ -162,7 +162,7 @@ class Uri implements UriInterface, \JsonSerializable
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
* that format).
*
- * @see https://tools.ietf.org/html/rfc3986#section-5.3
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3
*/
public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
{
@@ -219,7 +219,7 @@ class Uri implements UriInterface, \JsonSerializable
* @see Uri::isNetworkPathReference
* @see Uri::isAbsolutePathReference
* @see Uri::isRelativePathReference
- * @see https://tools.ietf.org/html/rfc3986#section-4
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4
*/
public static function isAbsolute(UriInterface $uri): bool
{
@@ -231,7 +231,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that begins with two slash characters is termed an network-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isNetworkPathReference(UriInterface $uri): bool
{
@@ -243,7 +243,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that begins with a single slash character is termed an absolute-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isAbsolutePathReference(UriInterface $uri): bool
{
@@ -258,7 +258,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that does not begin with a slash character is termed a relative-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isRelativePathReference(UriInterface $uri): bool
{
@@ -277,7 +277,7 @@ class Uri implements UriInterface, \JsonSerializable
* @param UriInterface $uri The URI to check
* @param UriInterface|null $base An optional base URI to compare against
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.4
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
*/
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
{
@@ -336,8 +336,8 @@ class Uri implements UriInterface, \JsonSerializable
*
* It has the same behavior as withQueryValue() but for an associative array of key => value.
*
- * @param UriInterface $uri URI to use as a base.
- * @param array<string, string|null> $keyValueArray Associative array of key and values
+ * @param UriInterface $uri URI to use as a base.
+ * @param (string|null)[] $keyValueArray Associative array of key and values
*/
public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface
{
@@ -353,7 +353,7 @@ class Uri implements UriInterface, \JsonSerializable
/**
* Creates a URI from a hash of `parse_url` components.
*
- * @see http://php.net/manual/en/function.parse-url.php
+ * @see https://www.php.net/manual/en/function.parse-url.php
*
* @throws MalformedUriException If the components do not form a valid URI.
*/
@@ -638,7 +638,7 @@ class Uri implements UriInterface, \JsonSerializable
}
/**
- * @param string[] $keys
+ * @param (string|int)[] $keys
*
* @return string[]
*/
@@ -650,7 +650,9 @@ class Uri implements UriInterface, \JsonSerializable
return [];
}
- $decodedKeys = array_map('rawurldecode', $keys);
+ $decodedKeys = array_map(function ($k): string {
+ return rawurldecode((string) $k);
+ }, $keys);
return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);