Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordpres.../vendor_p.../guzzleht.../guzzle/src
File: TransferStats.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace YoastSEO_Vendor\GuzzleHttp;
[2] Fix | Delete
[3] Fix | Delete
use YoastSEO_Vendor\Psr\Http\Message\RequestInterface;
[4] Fix | Delete
use YoastSEO_Vendor\Psr\Http\Message\ResponseInterface;
[5] Fix | Delete
use YoastSEO_Vendor\Psr\Http\Message\UriInterface;
[6] Fix | Delete
/**
[7] Fix | Delete
* Represents data at the point after it was transferred either successfully
[8] Fix | Delete
* or after a network error.
[9] Fix | Delete
*/
[10] Fix | Delete
final class TransferStats
[11] Fix | Delete
{
[12] Fix | Delete
/**
[13] Fix | Delete
* @var RequestInterface
[14] Fix | Delete
*/
[15] Fix | Delete
private $request;
[16] Fix | Delete
/**
[17] Fix | Delete
* @var ResponseInterface|null
[18] Fix | Delete
*/
[19] Fix | Delete
private $response;
[20] Fix | Delete
/**
[21] Fix | Delete
* @var float|null
[22] Fix | Delete
*/
[23] Fix | Delete
private $transferTime;
[24] Fix | Delete
/**
[25] Fix | Delete
* @var array
[26] Fix | Delete
*/
[27] Fix | Delete
private $handlerStats;
[28] Fix | Delete
/**
[29] Fix | Delete
* @var mixed|null
[30] Fix | Delete
*/
[31] Fix | Delete
private $handlerErrorData;
[32] Fix | Delete
/**
[33] Fix | Delete
* @param RequestInterface $request Request that was sent.
[34] Fix | Delete
* @param ResponseInterface|null $response Response received (if any)
[35] Fix | Delete
* @param float|null $transferTime Total handler transfer time.
[36] Fix | Delete
* @param mixed $handlerErrorData Handler error data.
[37] Fix | Delete
* @param array $handlerStats Handler specific stats.
[38] Fix | Delete
*/
[39] Fix | Delete
public function __construct(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface $response = null, float $transferTime = null, $handlerErrorData = null, array $handlerStats = [])
[40] Fix | Delete
{
[41] Fix | Delete
$this->request = $request;
[42] Fix | Delete
$this->response = $response;
[43] Fix | Delete
$this->transferTime = $transferTime;
[44] Fix | Delete
$this->handlerErrorData = $handlerErrorData;
[45] Fix | Delete
$this->handlerStats = $handlerStats;
[46] Fix | Delete
}
[47] Fix | Delete
public function getRequest() : \YoastSEO_Vendor\Psr\Http\Message\RequestInterface
[48] Fix | Delete
{
[49] Fix | Delete
return $this->request;
[50] Fix | Delete
}
[51] Fix | Delete
/**
[52] Fix | Delete
* Returns the response that was received (if any).
[53] Fix | Delete
*/
[54] Fix | Delete
public function getResponse() : ?\YoastSEO_Vendor\Psr\Http\Message\ResponseInterface
[55] Fix | Delete
{
[56] Fix | Delete
return $this->response;
[57] Fix | Delete
}
[58] Fix | Delete
/**
[59] Fix | Delete
* Returns true if a response was received.
[60] Fix | Delete
*/
[61] Fix | Delete
public function hasResponse() : bool
[62] Fix | Delete
{
[63] Fix | Delete
return $this->response !== null;
[64] Fix | Delete
}
[65] Fix | Delete
/**
[66] Fix | Delete
* Gets handler specific error data.
[67] Fix | Delete
*
[68] Fix | Delete
* This might be an exception, a integer representing an error code, or
[69] Fix | Delete
* anything else. Relying on this value assumes that you know what handler
[70] Fix | Delete
* you are using.
[71] Fix | Delete
*
[72] Fix | Delete
* @return mixed
[73] Fix | Delete
*/
[74] Fix | Delete
public function getHandlerErrorData()
[75] Fix | Delete
{
[76] Fix | Delete
return $this->handlerErrorData;
[77] Fix | Delete
}
[78] Fix | Delete
/**
[79] Fix | Delete
* Get the effective URI the request was sent to.
[80] Fix | Delete
*/
[81] Fix | Delete
public function getEffectiveUri() : \YoastSEO_Vendor\Psr\Http\Message\UriInterface
[82] Fix | Delete
{
[83] Fix | Delete
return $this->request->getUri();
[84] Fix | Delete
}
[85] Fix | Delete
/**
[86] Fix | Delete
* Get the estimated time the request was being transferred by the handler.
[87] Fix | Delete
*
[88] Fix | Delete
* @return float|null Time in seconds.
[89] Fix | Delete
*/
[90] Fix | Delete
public function getTransferTime() : ?float
[91] Fix | Delete
{
[92] Fix | Delete
return $this->transferTime;
[93] Fix | Delete
}
[94] Fix | Delete
/**
[95] Fix | Delete
* Gets an array of all of the handler specific transfer data.
[96] Fix | Delete
*/
[97] Fix | Delete
public function getHandlerStats() : array
[98] Fix | Delete
{
[99] Fix | Delete
return $this->handlerStats;
[100] Fix | Delete
}
[101] Fix | Delete
/**
[102] Fix | Delete
* Get a specific handler statistic from the handler by name.
[103] Fix | Delete
*
[104] Fix | Delete
* @param string $stat Handler specific transfer stat to retrieve.
[105] Fix | Delete
*
[106] Fix | Delete
* @return mixed|null
[107] Fix | Delete
*/
[108] Fix | Delete
public function getHandlerStat(string $stat)
[109] Fix | Delete
{
[110] Fix | Delete
return $this->handlerStats[$stat] ?? null;
[111] Fix | Delete
}
[112] Fix | Delete
}
[113] Fix | Delete
[114] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function