Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
solcloud committed Dec 3, 2021
1 parent 62db708 commit 1f0a284
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/AbstractProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public function __construct(int $numberOfInternalProxyAfterThisProxy, ?IRequestD
* Process Request and print Response
* @param Request $request if NULL Request will be parsed from POST data using requestPostKey
*/
public function process(Request $request = NULL): void
public function process(Request $request = null): void
{
try {
$this->setRequest($request === NULL ? $this->parseRequest() : $request);
$this->setRequest($request === null ? $this->parseRequest() : $request);

$this->run();
} catch (Throwable $ex) {
Expand Down Expand Up @@ -133,7 +133,7 @@ protected function parseRequest(): Request
}

$request = @unserialize($_POST[$this->requestPostKey]);
if ($request === FALSE) {
if ($request === false) {
throw new ProxyException('Unserialization of Request failed');
}

Expand All @@ -143,14 +143,14 @@ protected function parseRequest(): Request
/**
* Send POST request with Request object to given url, parsing Response object from (hopefully serialized) response
* @param string $url intercom url
* @param array $aditionalData additional POST data for intercom
* @param array $additionalData additional POST data for intercom
*/
protected function forward(string $url, array $aditionalData = [])
protected function forward(string $url, array $additionalData = [])
{
$this->internalCommunicationUrl = $url;

$postFields = array_merge(
$aditionalData
$additionalData
, [
$this->requestPostKey => serialize($this->request),
]
Expand All @@ -171,7 +171,7 @@ private function createCommunicationRequest(string $url, array $postFields): Req
->setMethod('POST')
->setUrl($url)
->setPostFields($postFields)
->setFollowLocation(TRUE)
->setFollowLocation(true)
->setVerifyHost($this->getRequest()->getVerifyHost())
->setVerifyPeer($this->getRequest()->getVerifyPeer())
->setConnectionTimeoutSec($this->getRequest()->getConnectionTimeoutSec())
Expand Down Expand Up @@ -204,7 +204,7 @@ protected function printResponse()
protected function setResponseFromSerializedString(string $serializedResponseString): void
{
$response = @unserialize($serializedResponseString);
if ($response === FALSE) {
if ($response === false) {
throw new ProxyException('Unserialization of Response failed');
}

Expand All @@ -227,7 +227,7 @@ protected function getRequest(): Request
protected function setResponse(Response $response): void
{
$responseException = $response->getException();
if ($responseException !== NULL && $responseException instanceof HttpException) {
if ($responseException !== null && $responseException instanceof HttpException) {
throw $responseException;
}

Expand Down

0 comments on commit 1f0a284

Please sign in to comment.