@@ -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,16 +105,16 @@ 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 | 112 | $this->log->error('JiraRestApi response fail with code : ' . $e->getCode(), [ |
113 | 113 | $httpMethod, $url, $options, |
114 | - (string)$e->getRequest()->getBody(), |
|
114 | + (string) $e->getRequest()->getBody(), |
|
115 | 115 | $e->getRequest()->getHeaders(), |
116 | - (string)$e->getResponse()->getBody() |
|
117 | - ]);g |
|
116 | + (string) $e->getResponse()->getBody() |
|
117 | + ]); g |
|
118 | 118 | $response = $e->getResponse(); |
119 | 119 | } |
120 | 120 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $promises = []; |
147 | 147 | |
148 | - if(!empty($filePathArray)) { |
|
148 | + if (!empty($filePathArray)) { |
|
149 | 149 | |
150 | 150 | foreach ($filePathArray as $filename => $filePath) { |
151 | 151 | // load each files separately |
@@ -167,11 +167,11 @@ discard block |
||
167 | 167 | $this->log->info('JiraRestApi requestAsync: ', [Request::METHOD_POST, $url, $options]); |
168 | 168 | $promises[] = $this->transport |
169 | 169 | ->requestAsync(Request::METHOD_POST, $url, $options) |
170 | - ->then(function (ResponseInterface $response) { |
|
170 | + ->then(function(ResponseInterface $response) { |
|
171 | 171 | $this->log->info('JiraRestApi responseAsync: ', [$response->getHeaders(), (string) $response->getBody()]); |
172 | 172 | return $response; |
173 | - }, function (RequestException $e) { |
|
174 | - if($e instanceof ConnectException) { |
|
173 | + }, function(RequestException $e) { |
|
174 | + if ($e instanceof ConnectException) { |
|
175 | 175 | $this->log->critical('JiraRestApi connection exception: ', [$e->getMessage()]); |
176 | 176 | return false; |
177 | 177 | } else { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | { |
236 | 236 | $array = json_decode(json_encode($array), true); // toArray |
237 | 237 | |
238 | - $array = is_callable($callback) ? array_filter($array, $callback) : array_filter((array)$array); |
|
238 | + $array = is_callable($callback) ? array_filter($array, $callback) : array_filter((array) $array); |
|
239 | 239 | foreach ($array as &$value) { |
240 | 240 | if (is_array($value)) { |
241 | 241 | $value = call_user_func([$this, 'filterNullVariable'], $value, $callback); |