@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | $headers = []; |
| 89 | 89 | foreach ($this->getHeaders() as $key => $value) { |
| 90 | - $headers[] = $key . ': ' . $value; |
|
| 90 | + $headers[] = $key.': '.$value; |
|
| 91 | 91 | } |
| 92 | 92 | $headers[self::PSFS_TRACK_HEADER] = Logger::getUid(); |
| 93 | 93 | if (count($headers)) { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | case Request::VERB_GET: |
| 118 | 118 | if (!empty($this->params)) { |
| 119 | 119 | $sep = false === strpos($this->getUrl(), '?') ? '?' : ''; |
| 120 | - $this->setUrl($this->getUrl() . $sep . http_build_query($this->getParams()), false); |
|
| 120 | + $this->setUrl($this->getUrl().$sep.http_build_query($this->getParams()), false); |
|
| 121 | 121 | } |
| 122 | 122 | break; |
| 123 | 123 | case Request::VERB_POST: |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if ($this->isDebug() && is_resource($verbose)) { |
| 150 | 150 | $this->dumpVerboseLogs($verbose); |
| 151 | 151 | } |
| 152 | - Logger::log($this->getUrl() . ' response: ', LOG_DEBUG, is_array($this->result) ? $this->result : [$this->result]); |
|
| 152 | + Logger::log($this->getUrl().' response: ', LOG_DEBUG, is_array($this->result) ? $this->result : [$this->result]); |
|
| 153 | 153 | $this->info = array_merge($this->info, curl_getinfo($this->con)); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @return ParameterTrait |
| 50 | 50 | */ |
| 51 | 51 | public function dropParam($key) { |
| 52 | - if(array_key_exists($key, $this->params)) { |
|
| 52 | + if (array_key_exists($key, $this->params)) { |
|
| 53 | 53 | unset($this->params[$key]); |
| 54 | 54 | } |
| 55 | 55 | return $this; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @return mixed|null |
| 61 | 61 | */ |
| 62 | 62 | public function getParam($key) { |
| 63 | - if(array_key_exists($key, $this->params)) { |
|
| 63 | + if (array_key_exists($key, $this->params)) { |
|
| 64 | 64 | return $this->params[$key]; |
| 65 | 65 | } |
| 66 | 66 | return null; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @return OptionTrait |
| 49 | 49 | */ |
| 50 | 50 | public function dropOption($key) { |
| 51 | - if(array_key_exists($key, $this->options)) { |
|
| 51 | + if (array_key_exists($key, $this->options)) { |
|
| 52 | 52 | unset($this->options[$key]); |
| 53 | 53 | } |
| 54 | 54 | return $this; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @return mixed|null |
| 60 | 60 | */ |
| 61 | 61 | public function getOption($key) { |
| 62 | - if(array_key_exists($key, $this->options)) { |
|
| 62 | + if (array_key_exists($key, $this->options)) { |
|
| 63 | 63 | return $this->options[$key]; |
| 64 | 64 | } |
| 65 | 65 | return null; |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | protected $isMultipart = false; |
| 73 | 73 | |
| 74 | 74 | protected function closeConnection() { |
| 75 | - if(null !== $this->con) { |
|
| 76 | - if(is_resource($this->con)) { |
|
| 75 | + if (null !== $this->con) { |
|
| 76 | + if (is_resource($this->con)) { |
|
| 77 | 77 | curl_close($this->con); |
| 78 | - } else { |
|
| 78 | + }else { |
|
| 79 | 79 | $this->setCon(null); |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $this->params = []; |
| 92 | 92 | $this->headers = []; |
| 93 | 93 | $this->debug = 'debug' === strtolower(Config::getParam('log.level', 'notice')); |
| 94 | - Logger::log('Context service for ' . static::class . ' cleared!'); |
|
| 94 | + Logger::log('Context service for '.static::class.' cleared!'); |
|
| 95 | 95 | $this->closeConnection(); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $this->clearContext(); |
| 101 | 101 | $con = curl_init($this->url); |
| 102 | - if(is_resource($con)) { |
|
| 102 | + if (is_resource($con)) { |
|
| 103 | 103 | $this->setCon($con); |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | public function setUrl($url, $cleanContext = true) |
| 120 | 120 | { |
| 121 | 121 | $this->url = $url; |
| 122 | - if($cleanContext) { |
|
| 122 | + if ($cleanContext) { |
|
| 123 | 123 | $this->initialize(); |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | */ |
| 185 | 185 | public function setIsJson($isJson = true) { |
| 186 | 186 | $this->isJson = $isJson; |
| 187 | - if($isJson) { |
|
| 187 | + if ($isJson) { |
|
| 188 | 188 | $this->setIsMultipart(false); |
| 189 | 189 | } |
| 190 | 190 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function setIsMultipart($isMultipart = true) { |
| 203 | 203 | $this->isMultipart = $isMultipart; |
| 204 | - if($isMultipart) { |
|
| 204 | + if ($isMultipart) { |
|
| 205 | 205 | $this->setIsJson(false); |
| 206 | 206 | } |
| 207 | 207 | } |