@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $headers = []; |
103 | 103 | foreach ($this->getHeaders() as $key => $value) { |
104 | - $headers[] = $key . ': ' . $value; |
|
104 | + $headers[] = $key.': '.$value; |
|
105 | 105 | } |
106 | 106 | $headers[self::PSFS_TRACK_HEADER] = Logger::getUid(); |
107 | 107 | if (count($headers)) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | case Request::VERB_GET: |
132 | 132 | if (!empty($this->params)) { |
133 | 133 | $sep = false === strpos($this->getUrl(), '?') ? '?' : ''; |
134 | - $this->setUrl($this->getUrl() . $sep . http_build_query($this->getParams()), false); |
|
134 | + $this->setUrl($this->getUrl().$sep.http_build_query($this->getParams()), false); |
|
135 | 135 | } |
136 | 136 | break; |
137 | 137 | case Request::VERB_POST: |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | if ('debug' === $logLevel && is_resource($verbose)) { |
165 | 165 | $this->dumpVerboseLogs($verbose); |
166 | 166 | } |
167 | - Logger::log($this->getUrl() . ' response: ', LOG_DEBUG, is_array($this->result) ? $this->result : [$this->result]); |
|
167 | + Logger::log($this->getUrl().' response: ', LOG_DEBUG, is_array($this->result) ? $this->result : [$this->result]); |
|
168 | 168 | $this->info = array_merge($this->info, curl_getinfo($this->con)); |
169 | 169 | } |
170 | 170 |
@@ -48,7 +48,7 @@ |
||
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; |
@@ -49,7 +49,7 @@ |
||
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; |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | protected $isMultipart = false; |
67 | 67 | |
68 | 68 | protected function closeConnection() { |
69 | - if(null !== $this->con) { |
|
70 | - if(is_resource($this->con)) { |
|
69 | + if (null !== $this->con) { |
|
70 | + if (is_resource($this->con)) { |
|
71 | 71 | @curl_close($this->con); |
72 | - } else { |
|
72 | + }else { |
|
73 | 73 | $this->setCon(null); |
74 | 74 | } |
75 | 75 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $this->url = NULL; |
86 | 86 | $this->params = array(); |
87 | 87 | $this->headers = array(); |
88 | - Logger::log('Context service for ' . static::class . ' cleared!'); |
|
88 | + Logger::log('Context service for '.static::class.' cleared!'); |
|
89 | 89 | $this->closeConnection(); |
90 | 90 | } |
91 | 91 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function setUrl($url, $cleanContext = true) |
112 | 112 | { |
113 | 113 | $this->url = $url; |
114 | - if($cleanContext) { |
|
114 | + if ($cleanContext) { |
|
115 | 115 | $this->initialize(); |
116 | 116 | } |
117 | 117 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function setIsJson($isJson = true) { |
178 | 178 | $this->isJson = $isJson; |
179 | - if($isJson) { |
|
179 | + if ($isJson) { |
|
180 | 180 | $this->setIsMultipart(false); |
181 | 181 | } |
182 | 182 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function setIsMultipart($isMultipart = true) { |
195 | 195 | $this->isMultipart = $isMultipart; |
196 | - if($isMultipart) { |
|
196 | + if ($isMultipart) { |
|
197 | 197 | $this->setIsJson(false); |
198 | 198 | } |
199 | 199 | } |