Aggiornato Composer
This commit is contained in:
16
vendor/guzzlehttp/guzzle/src/HandlerStack.php
vendored
16
vendor/guzzlehttp/guzzle/src/HandlerStack.php
vendored
@@ -44,7 +44,7 @@ class HandlerStack
|
||||
* handler is provided, the best handler for your
|
||||
* system will be utilized.
|
||||
*/
|
||||
public static function create(?callable $handler = null): self
|
||||
public static function create(callable $handler = null): self
|
||||
{
|
||||
$stack = new self($handler ?: Utils::chooseHandler());
|
||||
$stack->push(Middleware::httpErrors(), 'http_errors');
|
||||
@@ -86,14 +86,14 @@ class HandlerStack
|
||||
$stack = [];
|
||||
|
||||
if ($this->handler !== null) {
|
||||
$stack[] = "0) Handler: " . $this->debugCallable($this->handler);
|
||||
$stack[] = '0) Handler: '.$this->debugCallable($this->handler);
|
||||
}
|
||||
|
||||
$result = '';
|
||||
foreach (\array_reverse($this->stack) as $tuple) {
|
||||
$depth++;
|
||||
++$depth;
|
||||
$str = "{$depth}) Name: '{$tuple[1]}', ";
|
||||
$str .= "Function: " . $this->debugCallable($tuple[0]);
|
||||
$str .= 'Function: '.$this->debugCallable($tuple[0]);
|
||||
$result = "> {$str}\n{$result}";
|
||||
$stack[] = $str;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class HandlerStack
|
||||
*/
|
||||
public function hasHandler(): bool
|
||||
{
|
||||
return $this->handler !== null ;
|
||||
return $this->handler !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +131,7 @@ class HandlerStack
|
||||
* @param callable(callable): callable $middleware Middleware function
|
||||
* @param string $name Name to register for this middleware.
|
||||
*/
|
||||
public function unshift(callable $middleware, ?string $name = null): void
|
||||
public function unshift(callable $middleware, string $name = null): void
|
||||
{
|
||||
\array_unshift($this->stack, [$middleware, $name]);
|
||||
$this->cached = null;
|
||||
@@ -266,10 +266,10 @@ class HandlerStack
|
||||
if (\is_array($fn)) {
|
||||
return \is_string($fn[0])
|
||||
? "callable({$fn[0]}::{$fn[1]})"
|
||||
: "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])";
|
||||
: "callable(['".\get_class($fn[0])."', '{$fn[1]}'])";
|
||||
}
|
||||
|
||||
/** @var object $fn */
|
||||
return 'callable(' . \spl_object_hash($fn) . ')';
|
||||
return 'callable('.\spl_object_hash($fn).')';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user