Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/guzzleht.../promises/src
File: RejectionException.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace GuzzleHttp\Promise;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* A special exception that is thrown when waiting on a rejected promise.
[5] Fix | Delete
*
[6] Fix | Delete
* The reason value is available via the getReason() method.
[7] Fix | Delete
*/
[8] Fix | Delete
class RejectionException extends \RuntimeException
[9] Fix | Delete
{
[10] Fix | Delete
/** @var mixed Rejection reason. */
[11] Fix | Delete
private $reason;
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* @param mixed $reason Rejection reason.
[15] Fix | Delete
* @param string $description Optional description
[16] Fix | Delete
*/
[17] Fix | Delete
public function __construct($reason, $description = null)
[18] Fix | Delete
{
[19] Fix | Delete
$this->reason = $reason;
[20] Fix | Delete
[21] Fix | Delete
$message = 'The promise was rejected';
[22] Fix | Delete
[23] Fix | Delete
if ($description) {
[24] Fix | Delete
$message .= ' with reason: ' . $description;
[25] Fix | Delete
} elseif (is_string($reason)
[26] Fix | Delete
|| (is_object($reason) && method_exists($reason, '__toString'))
[27] Fix | Delete
) {
[28] Fix | Delete
$message .= ' with reason: ' . $this->reason;
[29] Fix | Delete
} elseif ($reason instanceof \JsonSerializable) {
[30] Fix | Delete
$message .= ' with reason: '
[31] Fix | Delete
. json_encode($this->reason, JSON_PRETTY_PRINT);
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
parent::__construct($message);
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Returns the rejection reason.
[39] Fix | Delete
*
[40] Fix | Delete
* @return mixed
[41] Fix | Delete
*/
[42] Fix | Delete
public function getReason()
[43] Fix | Delete
{
[44] Fix | Delete
return $this->reason;
[45] Fix | Delete
}
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function