@@ -84,10 +84,10 @@ public function __construct(int $numberOfInternalProxyAfterThisProxy, ?IRequestD
8484 * Process Request and print Response
8585 * @param Request $request if NULL Request will be parsed from POST data using requestPostKey
8686 */
87- public function process (Request $ request = NULL ): void
87+ public function process (Request $ request = null ): void
8888 {
8989 try {
90- $ this ->setRequest ($ request === NULL ? $ this ->parseRequest () : $ request );
90+ $ this ->setRequest ($ request === null ? $ this ->parseRequest () : $ request );
9191
9292 $ this ->run ();
9393 } catch (Throwable $ ex ) {
@@ -133,7 +133,7 @@ protected function parseRequest(): Request
133133 }
134134
135135 $ request = @unserialize ($ _POST [$ this ->requestPostKey ]);
136- if ($ request === FALSE ) {
136+ if ($ request === false ) {
137137 throw new ProxyException ('Unserialization of Request failed ' );
138138 }
139139
@@ -143,14 +143,14 @@ protected function parseRequest(): Request
143143 /**
144144 * Send POST request with Request object to given url, parsing Response object from (hopefully serialized) response
145145 * @param string $url intercom url
146- * @param array $aditionalData additional POST data for intercom
146+ * @param array $additionalData additional POST data for intercom
147147 */
148- protected function forward (string $ url , array $ aditionalData = [])
148+ protected function forward (string $ url , array $ additionalData = [])
149149 {
150150 $ this ->internalCommunicationUrl = $ url ;
151151
152152 $ postFields = array_merge (
153- $ aditionalData
153+ $ additionalData
154154 , [
155155 $ this ->requestPostKey => serialize ($ this ->request ),
156156 ]
@@ -171,7 +171,7 @@ private function createCommunicationRequest(string $url, array $postFields): Req
171171 ->setMethod ('POST ' )
172172 ->setUrl ($ url )
173173 ->setPostFields ($ postFields )
174- ->setFollowLocation (TRUE )
174+ ->setFollowLocation (true )
175175 ->setVerifyHost ($ this ->getRequest ()->getVerifyHost ())
176176 ->setVerifyPeer ($ this ->getRequest ()->getVerifyPeer ())
177177 ->setConnectionTimeoutSec ($ this ->getRequest ()->getConnectionTimeoutSec ())
@@ -204,7 +204,7 @@ protected function printResponse()
204204 protected function setResponseFromSerializedString (string $ serializedResponseString ): void
205205 {
206206 $ response = @unserialize ($ serializedResponseString );
207- if ($ response === FALSE ) {
207+ if ($ response === false ) {
208208 throw new ProxyException ('Unserialization of Response failed ' );
209209 }
210210
@@ -227,7 +227,7 @@ protected function getRequest(): Request
227227 protected function setResponse (Response $ response ): void
228228 {
229229 $ responseException = $ response ->getException ();
230- if ($ responseException !== NULL && $ responseException instanceof HttpException) {
230+ if ($ responseException !== null && $ responseException instanceof HttpException) {
231231 throw $ responseException ;
232232 }
233233
0 commit comments