| Conditions | 8 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function handle($request, Closure $next) |
||
| 37 | { |
||
| 38 | $response = $next($request); |
||
| 39 | if ($response instanceof Response and $this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix').'/run')) { |
||
| 40 | try { |
||
| 41 | $response->getContent(); |
||
| 42 | } |
||
| 43 | catch (\ErrorException $e) { |
||
| 44 | return $response; |
||
| 45 | } |
||
| 46 | |||
| 47 | if(!$this->webartisan->useAuthentication() |
||
| 48 | or ($this->webartisan->useAuthentication() |
||
| 49 | and $request->session()->has('webartisan__authenticated'))) { |
||
| 50 | |||
| 51 | $this->webartisan->setAuthenticated(); |
||
| 52 | } |
||
| 53 | |||
| 54 | $this->webartisan->render($response); |
||
| 55 | } |
||
| 56 | return $response; |
||
| 57 | } |
||
| 58 | } |