@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->json_mapper = new \JsonMapper(); |
64 | 64 | $this->json_mapper->bEnforceMapType = false; |
65 | 65 | $this->json_mapper->setLogger($log); |
66 | - $this->json_mapper->undefinedPropertyHandler = function ($obj, $val) { |
|
66 | + $this->json_mapper->undefinedPropertyHandler = function($obj, $val) { |
|
67 | 67 | $this->log->debug('Handle undefined property', [$val, $obj]); |
68 | 68 | }; |
69 | 69 | |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | try { |
106 | 106 | $this->log->info('JiraRestApi request: ', [$httpMethod, $url, $options]); |
107 | 107 | $response = $this->transport->request($httpMethod, $url, $options); |
108 | - $this->log->info('JiraRestApi response: ', [$response->getHeaders(), (string)$response->getBody()]); |
|
108 | + $this->log->info('JiraRestApi response: ', [$response->getHeaders(), (string) $response->getBody()]); |
|
109 | 109 | } catch (ConnectException $e) { |
110 | 110 | $this->log->critical('JiraRestApi connection exception: ', [$e->getMessage()]); |
111 | 111 | } catch (RequestException $e) { |
112 | - $this->log->error('JiraRestApi response fail with code : ' . $e->getCode(), [(string)$e->getRequest()->getBody(), $e->getRequest()->getHeaders(), (string)$e->getResponse()->getBody()]); |
|
112 | + $this->log->error('JiraRestApi response fail with code : ' . $e->getCode(), [(string) $e->getRequest()->getBody(), $e->getRequest()->getHeaders(), (string) $e->getResponse()->getBody()]); |
|
113 | 113 | $response = $e->getResponse(); |
114 | 114 | } |
115 | 115 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $promises = []; |
142 | 142 | |
143 | - if(!empty($filePathArray)) { |
|
143 | + if (!empty($filePathArray)) { |
|
144 | 144 | |
145 | 145 | foreach ($filePathArray as $filename => $filePath) { |
146 | 146 | // load each files separately |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | $this->log->info('JiraRestApi requestAsync: ', [Request::METHOD_POST, $url, $options]); |
163 | 163 | $promises[] = $this->transport |
164 | 164 | ->requestAsync(Request::METHOD_POST, $url, $options) |
165 | - ->then(function (ResponseInterface $response) { |
|
165 | + ->then(function(ResponseInterface $response) { |
|
166 | 166 | $this->log->info('JiraRestApi responseAsync: ', [$response->getHeaders(), (string) $response->getBody()]); |
167 | 167 | return $response; |
168 | - }, function (RequestException $e) { |
|
169 | - if($e instanceof ConnectException) { |
|
168 | + }, function(RequestException $e) { |
|
169 | + if ($e instanceof ConnectException) { |
|
170 | 170 | $this->log->critical('JiraRestApi connection exception: ', [$e->getMessage()]); |
171 | 171 | return false; |
172 | 172 | } else { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | $array = json_decode(json_encode($array), true); // toArray |
232 | 232 | |
233 | - $array = is_callable($callback) ? array_filter($array, $callback) : array_filter((array)$array); |
|
233 | + $array = is_callable($callback) ? array_filter($array, $callback) : array_filter((array) $array); |
|
234 | 234 | foreach ($array as &$value) { |
235 | 235 | if (is_array($value)) { |
236 | 236 | $value = call_user_func([$this, 'filterNullVariable'], $value, $callback); |