Conditions | 3 |
Paths | 4 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function getRequest() |
||
29 | { |
||
30 | $data = [ |
||
31 | 'status_code' => $this->response->getStatusCode(), |
||
32 | 'host' => $this->request->getHost(), |
||
33 | 'request_uri' => $this->request->getPath(), |
||
34 | 'user_agent' => $this->request->getUserAgent(), |
||
35 | 'referer' => $this->request->getReferer(), |
||
36 | 'scheme' => $this->request->getScheme(), |
||
37 | 'use_json' => true, |
||
38 | ]; |
||
39 | |||
40 | if ($this->response->getLocation()) { |
||
41 | $data['target'] = $this->response->getLocation(); |
||
42 | } |
||
43 | |||
44 | if ($this->response->getRuleId()) { |
||
45 | $data['rule_id'] = $this->response->getRuleId(); |
||
46 | } |
||
47 | |||
48 | return json_encode($data); |
||
49 | } |
||
61 |