@@ -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 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->closeConnection(); |
| 95 | 95 | $this->params = []; |
| 96 | 96 | $con = curl_init($this->url); |
| 97 | - if(is_resource($con)) { |
|
| 97 | + if (is_resource($con)) { |
|
| 98 | 98 | $this->setCon($con); |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | public function setUrl($url, $cleanContext = true) |
| 115 | 115 | { |
| 116 | 116 | $this->url = $url; |
| 117 | - if($cleanContext) { |
|
| 117 | + if ($cleanContext) { |
|
| 118 | 118 | $this->initialize(); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | public function setIsJson($isJson = true) { |
| 181 | 181 | $this->isJson = $isJson; |
| 182 | - if($isJson) { |
|
| 182 | + if ($isJson) { |
|
| 183 | 183 | $this->setIsMultipart(false); |
| 184 | 184 | } |
| 185 | 185 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | public function setIsMultipart($isMultipart = true) { |
| 198 | 198 | $this->isMultipart = $isMultipart; |
| 199 | - if($isMultipart) { |
|
| 199 | + if ($isMultipart) { |
|
| 200 | 200 | $this->setIsJson(false); |
| 201 | 201 | } |
| 202 | 202 | } |