@@ -132,6 +132,6 @@ |
||
132 | 132 | } |
133 | 133 | $processor->process(); |
134 | 134 | $response = $processor->getResponse(); |
135 | - return $response ? stream_get_contents($response) : '' ; |
|
135 | + return $response ? stream_get_contents($response) : ''; |
|
136 | 136 | } |
137 | 137 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | // ]; |
52 | 52 | |
53 | 53 | $context = stream_context_create($this->contextOptions); |
54 | - $link = $params->getSchema() . $params->getHost() . (!empty($params->getPort()) ? ':' . $params->getPort() : '' ); |
|
54 | + $link = $params->getSchema() . $params->getHost() . (!empty($params->getPort()) ? ':' . $params->getPort() : ''); |
|
55 | 55 | $timeout = is_null($params->getTimeout()) ? 10.0 : floatval($params->getTimeout()); // do NOT ask - php7 + phpstan |
56 | 56 | $filePointer = stream_socket_client($link, $errno, $errStr, $timeout, STREAM_CLIENT_CONNECT, $context); |
57 | 57 |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if (false === $parsedLink) { |
114 | 114 | throw new RequestException(static::$lang->rrHelpInvalidLink($this->link)); |
115 | 115 | } |
116 | - $schema = !empty($parsedLink["scheme"]) ? strtolower($parsedLink["scheme"]) : '' ; |
|
116 | + $schema = !empty($parsedLink["scheme"]) ? strtolower($parsedLink["scheme"]) : ''; |
|
117 | 117 | $libParams = $this->getFilledConnectionParams($schema, $parsedLink); |
118 | 118 | $libQuery = $this->getLibRequest($schema, $parsedLink, $libParams); |
119 | 119 | return $this->getLibResponseProcessor($schema)->setResponse( |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $query->maxLength = is_null($this->connectionParams['maxLength']) ? null : intval($this->connectionParams['maxLength']); |
225 | 225 | return $query |
226 | 226 | ->setRequestSettings($settings) |
227 | - ->setPath($parsed['path'] . (!empty($parsed['query']) ? '?' . $parsed['query'] : '' )) |
|
227 | + ->setPath($parsed['path'] . (!empty($parsed['query']) ? '?' . $parsed['query'] : '')) |
|
228 | 228 | ->setMethod($this->getMethod()) |
229 | 229 | ->setInline(boolval($this->connectionParams['multipart'])) |
230 | 230 | ->addValues(empty($this->postContent) ? [] : (array) $this->postContent) |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | protected function getMethod(): string |
238 | 238 | { |
239 | 239 | $method = strtoupper(strval($this->connectionParams['method'])); |
240 | - return (in_array($method, ['GET', 'POST', 'PUT', 'DELETE'])) ? $method : 'GET' ; |
|
240 | + return (in_array($method, ['GET', 'POST', 'PUT', 'DELETE'])) ? $method : 'GET'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $this->lang = $lang; |
35 | 35 | $pointer = empty($contextOptions) |
36 | 36 | ? ($long ? new RemoteRequest\Sockets\PfSocket($lang) : new RemoteRequest\Sockets\FSocket($lang)) |
37 | - : (new RemoteRequest\Sockets\Stream($lang))->setContextOptions($contextOptions) ; |
|
37 | + : (new RemoteRequest\Sockets\Stream($lang))->setContextOptions($contextOptions); |
|
38 | 38 | $this->processor = new RemoteRequest\Connection\Processor($lang, $pointer); |
39 | 39 | $this->params = $this->loadParams(); |
40 | 40 | $this->query = $this->loadQuery(); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function __construct(Interfaces\IRRTranslations $lang, Sockets\ASocket $method = null) |
32 | 32 | { |
33 | - $this->socket = (empty($method)) ? new Sockets\FSocket($lang) : $method ; |
|
33 | + $this->socket = (empty($method)) ? new Sockets\FSocket($lang) : $method; |
|
34 | 34 | $this->processor = ($this->socket instanceof Sockets\Socket) |
35 | 35 | ? new Pointers\SocketProcessor($lang) |
36 | 36 | : new Pointers\Processor($lang) |