@@ -52,13 +52,13 @@ public function __construct(
5252 array $ skipCapture ,
5353 EventDispatcherInterface $ dispatcher
5454 ) {
55- if (!$ client ) {
55+ if (! $ client ) {
5656 $ client = new SentrySymfonyClient ();
5757 }
5858
5959 $ this ->tokenStorage = $ tokenStorage ;
6060 $ this ->authorizationChecker = $ authorizationChecker ;
61- $ this ->dispatcher = $ dispatcher ;
61+ $ this ->eventDispatcher = $ dispatcher ;
6262 $ this ->client = $ client ;
6363 $ this ->skipCapture = $ skipCapture ;
6464 }
@@ -92,7 +92,7 @@ public function onKernelRequest(GetResponseEvent $event)
9292 $ this ->setUserValue ($ token ->getUser ());
9393
9494 $ contextEvent = new SentryUserContextEvent ($ token );
95- $ this ->dispatcher ->dispatch (SentrySymfonyEvents::SET_USER_CONTEXT , $ contextEvent );
95+ $ this ->eventDispatcher ->dispatch (SentrySymfonyEvents::SET_USER_CONTEXT , $ contextEvent );
9696 }
9797 }
9898
@@ -107,7 +107,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
107107 return ;
108108 }
109109
110- $ this ->dispatcher ->dispatch (SentrySymfonyEvents::PRE_CAPTURE , $ event );
110+ $ this ->eventDispatcher ->dispatch (SentrySymfonyEvents::PRE_CAPTURE , $ event );
111111 $ this ->client ->captureException ($ exception );
112112 }
113113
@@ -130,7 +130,7 @@ public function onConsoleException(ConsoleExceptionEvent $event)
130130 ),
131131 );
132132
133- $ this ->dispatcher ->dispatch (SentrySymfonyEvents::PRE_CAPTURE , $ event );
133+ $ this ->eventDispatcher ->dispatch (SentrySymfonyEvents::PRE_CAPTURE , $ event );
134134 $ this ->client ->captureException ($ exception , $ data );
135135 }
136136
@@ -153,11 +153,13 @@ private function setUserValue($user)
153153 {
154154 if ($ user instanceof UserInterface) {
155155 $ this ->client ->set_user_data ($ user ->getUsername ());
156+
156157 return ;
157158 }
158159
159160 if (is_string ($ user )) {
160161 $ this ->client ->set_user_data ($ user );
162+
161163 return ;
162164 }
163165
0 commit comments