| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function addCookieToResponse($request, $response) |
||
| 35 | { |
||
| 36 | if ($this->addHttpCookie) { |
||
| 37 | $config = config('session'); |
||
|
|
|||
| 38 | $response->headers->setCookie( |
||
| 39 | new Cookie( |
||
| 40 | 'XSRF-TOKEN', |
||
| 41 | $request->session()->token(), |
||
| 42 | $this->availableAt(60 * $config['lifetime']), |
||
| 43 | $config['path'], |
||
| 44 | $config['domain'], |
||
| 45 | $config['secure'], |
||
| 46 | false, |
||
| 47 | false, |
||
| 48 | $config['same_site'] ?? null |
||
| 49 | ) |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | return $response; |
||
| 53 | } |
||
| 55 |