Feature: Labelprint für Kistenetiketten hinzugefügt
This commit is contained in:
20
vendor/guzzlehttp/psr7/src/Utils.php
vendored
20
vendor/guzzlehttp/psr7/src/Utils.php
vendored
@@ -231,7 +231,7 @@ final class Utils
|
||||
* @param StreamInterface $stream Stream to read from
|
||||
* @param int|null $maxLength Maximum buffer length
|
||||
*/
|
||||
public static function readLine(StreamInterface $stream, int $maxLength = null): string
|
||||
public static function readLine(StreamInterface $stream, ?int $maxLength = null): string
|
||||
{
|
||||
$buffer = '';
|
||||
$size = 0;
|
||||
@@ -250,6 +250,20 @@ final class Utils
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redact the password in the user info part of a URI.
|
||||
*/
|
||||
public static function redactUserInfo(UriInterface $uri): UriInterface
|
||||
{
|
||||
$userInfo = $uri->getUserInfo();
|
||||
|
||||
if (false !== ($pos = \strpos($userInfo, ':'))) {
|
||||
return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
|
||||
}
|
||||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new stream based on the input type.
|
||||
*
|
||||
@@ -383,7 +397,7 @@ final class Utils
|
||||
restore_error_handler();
|
||||
|
||||
if ($ex) {
|
||||
/** @var $ex \RuntimeException */
|
||||
/** @var \RuntimeException $ex */
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
@@ -430,7 +444,7 @@ final class Utils
|
||||
restore_error_handler();
|
||||
|
||||
if ($ex) {
|
||||
/** @var $ex \RuntimeException */
|
||||
/** @var \RuntimeException $ex */
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user