1414class DeamonLoggerExtraWebProcessorTest extends TestCase
1515{
1616
17- public function testProcessorWithNullContainer ()
17+ public function testProcessorWithNullContainer (): void
1818 {
1919 $ processor = new DeamonLoggerExtraWebProcessor ();
2020 $ originalRecord = $ this ->getRecord ();
@@ -26,7 +26,7 @@ public function testProcessorWithNullContainer()
2626 /**
2727 * @runInSeparateProcess
2828 */
29- public function testAddContextInfo ()
29+ public function testAddContextInfo (): void
3030 {
3131 $ config = $ this ->getDisplayConfig ([
3232 'env ' => true ,
@@ -49,7 +49,7 @@ public function testAddContextInfo()
4949 /**
5050 * @runInSeparateProcess
5151 */
52- public function testAddContextInfoWithoutLocaleAndVersion ()
52+ public function testAddContextInfoWithoutLocaleAndVersion (): void
5353 {
5454 $ config = $ this ->getDisplayConfig ([
5555 'env ' => true ,
@@ -69,7 +69,7 @@ public function testAddContextInfoWithoutLocaleAndVersion()
6969 $ this ->assertArrayHasKeyAndEquals ('application ' , $ record ->extra , 'foo_app ' );
7070 }
7171
72- public function testAddRequestInfo ()
72+ public function testAddRequestInfo (): void
7373 {
7474 $ config = $ this ->getDisplayConfig (
7575 [
@@ -92,7 +92,7 @@ public function testAddRequestInfo()
9292 $ this ->assertArrayHasKeyAndEquals ('client_ip ' , $ record ->extra , '123.456.789.123 ' );
9393 }
9494
95- public function testAddOnlyUserInfoOnDefinedClass ()
95+ public function testAddOnlyUserInfoOnDefinedClass (): void
9696 {
9797 $ config = $ this ->getDisplayConfig ([
9898 'user ' => true ,
@@ -109,7 +109,7 @@ public function testAddOnlyUserInfoOnDefinedClass()
109109 $ this ->assertArrayNotHasKey ('user_name ' , $ record ->extra );
110110 }
111111
112- public function testAddUserInfoWithNotExistingClass ()
112+ public function testAddUserInfoWithNotExistingClass (): void
113113 {
114114 $ config = $ this ->getDisplayConfig ([
115115 'user ' => true ,
@@ -121,7 +121,7 @@ public function testAddUserInfoWithNotExistingClass()
121121 $ this ->assertArrayNotHasKey ('user_name ' , $ record ->extra );
122122 }
123123
124- public function testAddUserInfoWithNullClass ()
124+ public function testAddUserInfoWithNullClass (): void
125125 {
126126 $ config = $ this ->getDisplayConfig ([
127127 'user ' => true ,
@@ -133,7 +133,7 @@ public function testAddUserInfoWithNullClass()
133133 $ this ->assertArrayNotHasKey ('user_name ' , $ record ->extra );
134134 }
135135
136- public function testAddUserinfoWithNoTokenStorage ()
136+ public function testAddUserinfoWithNoTokenStorage (): void
137137 {
138138 $ config = $ this ->getDisplayConfig ([
139139 'user ' => true ,
@@ -145,7 +145,7 @@ public function testAddUserinfoWithNoTokenStorage()
145145 $ this ->assertArrayNotHasKey ('user_name ' , $ record ->extra );
146146 }
147147
148- public function testAddUserInfo ()
148+ public function testAddUserInfo (): void
149149 {
150150 $ config = $ this ->getDisplayConfig ([
151151 'user ' => true ,
@@ -164,7 +164,7 @@ public function testAddUserInfo()
164164 $ this ->assertArrayHasKeyAndEquals ('user_name ' , $ record ->extra , 'foo ' );
165165 }
166166
167- protected function getDisplayConfig ($ trueValues , $ channelPrefix = null , $ user_class = '\Symfony\Component\Security\Core\User\UserInterface ' , $ user_methods = null )
167+ protected function getDisplayConfig ($ trueValues , $ channelPrefix = null , $ user_class = '\Symfony\Component\Security\Core\User\UserInterface ' , $ user_methods = null ): array
168168 {
169169 if (!is_array ($ user_methods )) {
170170 $ user_methods = [
@@ -195,13 +195,13 @@ protected function getDisplayConfig($trueValues, $channelPrefix = null, $user_cl
195195 ];
196196 }
197197
198- protected function assertArrayHasKeyAndEquals ($ key , $ array , $ value , $ message = '' )
198+ protected function assertArrayHasKeyAndEquals ($ key , $ array , $ value , $ message = '' ): void
199199 {
200200 $ this ->assertArrayHasKey ($ key , $ array );
201201 $ this ->assertEquals ($ value , $ array [$ key ], $ message );
202202 }
203203
204- private function getRequestStack ()
204+ private function getRequestStack (): RequestStack
205205 {
206206 $ request = new Request ([], [], [
207207 '_route ' => 'requested_route ' ,
@@ -217,12 +217,12 @@ private function getRequestStack()
217217 return $ stack ;
218218 }
219219
220- private function getLoggerExtraContext ($ locale = 'fr ' , $ version = null )
220+ private function getLoggerExtraContext ($ locale = 'fr ' , $ version = null ): DeamonLoggerExtraContext
221221 {
222222 return new DeamonLoggerExtraContext ('foo_app ' , $ locale , $ version );
223223 }
224224
225- private function getTokenStorage (UserInterface $ user = null )
225+ private function getTokenStorage (? UserInterface $ user = null ): TokenStorage
226226 {
227227 $ storage = new TokenStorage ();
228228 $ storage ->setToken (new MyToken ($ user ));
@@ -265,7 +265,7 @@ public function getSalt(): ?string
265265 //not needed in tests
266266 }
267267
268- public function eraseCredentials ()
268+ public function eraseCredentials (): void
269269 {
270270 //not needed in tests
271271 }
0 commit comments