提交的内容

This commit is contained in:
2025-05-12 15:45:02 +08:00
parent 629c4750da
commit b48c692775
3043 changed files with 34732 additions and 60810 deletions

10
vendor/guzzlehttp/psr7/src/UriResolver.php vendored Executable file → Normal file
View File

@ -11,14 +11,14 @@ use Psr\Http\Message\UriInterface;
*
* @author Tobias Schultze
*
* @see https://tools.ietf.org/html/rfc3986#section-5
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5
*/
final class UriResolver
{
/**
* Removes dot segments from a path and returns the new path.
*
* @see http://tools.ietf.org/html/rfc3986#section-5.2.4
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4
*/
public static function removeDotSegments(string $path): string
{
@ -53,7 +53,7 @@ final class UriResolver
/**
* Converts the relative URI into a new URI that is resolved against the base URI.
*
* @see http://tools.ietf.org/html/rfc3986#section-5.2
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2
*/
public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
{
@ -127,8 +127,8 @@ final class UriResolver
*/
public static function relativize(UriInterface $base, UriInterface $target): UriInterface
{
if ($target->getScheme() !== '' &&
($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
if ($target->getScheme() !== ''
&& ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
) {
return $target;
}