Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Illuminate\Http\Client; use GuzzleHttp\Psr7\Message; class RequestExcep..
Decoded Output download
<?php
namespace Illuminate\Http\Client;
use GuzzleHttp\Psr7\Message;
class RequestException extends HttpClientException
{
/**
* The response instance.
*
* @var \Illuminate\Http\Client\Response
*/
public $response;
/**
* Create a new exception instance.
*
* @param \Illuminate\Http\Client\Response $response
* @return void
*/
public function __construct(Response $response)
{
parent::__construct($this->prepareMessage($response), $response->status());
$this->response = $response;
}
/**
* Prepare the exception message.
*
* @param \Illuminate\Http\Client\Response $response
* @return string
*/
protected function prepareMessage(Response $response)
{
$message = "HTTP request returned status code {$response->status()}";
$summary = Message::bodySummary($response->toPsrResponse());
return is_null($summary) ? $message : $message .= ":
{$summary}
";
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Http\Client;
use GuzzleHttp\Psr7\Message;
class RequestException extends HttpClientException
{
/**
* The response instance.
*
* @var \Illuminate\Http\Client\Response
*/
public $response;
/**
* Create a new exception instance.
*
* @param \Illuminate\Http\Client\Response $response
* @return void
*/
public function __construct(Response $response)
{
parent::__construct($this->prepareMessage($response), $response->status());
$this->response = $response;
}
/**
* Prepare the exception message.
*
* @param \Illuminate\Http\Client\Response $response
* @return string
*/
protected function prepareMessage(Response $response)
{
$message = "HTTP request returned status code {$response->status()}";
$summary = Message::bodySummary($response->toPsrResponse());
return is_null($summary) ? $message : $message .= ":\n{$summary}\n";
}
}
Function Calls
None |
Stats
MD5 | 3afa8e413fea264e67a91e127da47670 |
Eval Count | 0 |
Decode Time | 86 ms |