Conditions | 4 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function handle($request, Closure $next) |
||
17 | { |
||
18 | if (!app()->environment('local') && app()->bound('sentry')) { |
||
|
|||
19 | /** @var \Raven_Client $sentry */ |
||
20 | $sentry = app('sentry'); |
||
21 | |||
22 | // Add user context |
||
23 | if (auth()->check()) { |
||
24 | $user = auth()->user(); |
||
25 | |||
26 | $sentry->user_context([ |
||
27 | 'github_username' => $user->github_username, |
||
28 | 'github_id' => $user->github_id, |
||
29 | 'github_token' => str_limit($user->github_token, 8), |
||
30 | ]); |
||
31 | } |
||
32 | } |
||
33 | |||
34 | return $next($request); |
||
35 | } |
||
37 |