| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | final protected function log($method, $endpoint, $params, ResponseInterface $response) |
||
| 24 | { |
||
| 25 | if (!($this->enableLogging && Helper::getConfig('enabled', true))) { |
||
| 26 | return; |
||
| 27 | } |
||
| 28 | |||
| 29 | $params = (array) $params; |
||
| 30 | |||
| 31 | ApiLog::create([ |
||
| 32 | 'client' => class_basename($this), |
||
| 33 | 'method' => $method, |
||
| 34 | 'endpoint' => $endpoint, |
||
| 35 | 'params' => $this->removeUnwantedParams($params), |
||
| 36 | 'response_code' => $response->getStatusCode(), |
||
| 37 | 'response' => (string) $response->getBody(), |
||
| 38 | ]); |
||
| 41 |