@@ -33,7 +33,6 @@ public function setUp(): void
3333 public function tearDown (): void
3434 {
3535 $ unsetMethod = new ReflectionMethod (App::class, 'unsetWhoopsHandler ' );
36- $ unsetMethod ->setAccessible (true );
3736
3837 $ app = App::instance ();
3938 $ unsetMethod ->invoke ($ app );
@@ -60,7 +59,6 @@ public function testExceptionHook(): void
6059 ]);
6160
6261 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
63- $ whoopsMethod ->setAccessible (true );
6462
6563 $ whoops = $ whoopsMethod ->invoke ($ app );
6664 $ handler = $ whoops ->getHandlers ()[1 ];
@@ -90,7 +88,6 @@ public function testExceptionHookDisableLogging(): void
9088 ]);
9189
9290 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
93- $ whoopsMethod ->setAccessible (true );
9491
9592 $ whoops = $ whoopsMethod ->invoke ($ app );
9693 $ handler = $ whoops ->getHandlers ()[1 ];
@@ -109,10 +106,7 @@ public function testExceptionHookDisableLogging(): void
109106 public function testHandleCliErrors (): void
110107 {
111108 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
112- $ whoopsMethod ->setAccessible (true );
113-
114- $ testMethod = new ReflectionMethod (App::class, 'handleCliErrors ' );
115- $ testMethod ->setAccessible (true );
109+ $ testMethod = new ReflectionMethod (App::class, 'handleCliErrors ' );
116110
117111 $ app = App::instance ();
118112 $ whoops = $ whoopsMethod ->invoke ($ app );
@@ -127,10 +121,7 @@ public function testHandleCliErrors(): void
127121 public function testHandleErrors1 (): void
128122 {
129123 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
130- $ whoopsMethod ->setAccessible (true );
131-
132- $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
133- $ testMethod ->setAccessible (true );
124+ $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
134125
135126 $ app = $ this ->app ->clone ([
136127 'cli ' => true
@@ -148,10 +139,7 @@ public function testHandleErrors1(): void
148139 public function testHandleErrors2 (): void
149140 {
150141 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
151- $ whoopsMethod ->setAccessible (true );
152-
153- $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
154- $ testMethod ->setAccessible (true );
142+ $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
155143
156144 $ app = $ this ->app ->clone ([
157145 'cli ' => false ,
@@ -172,10 +160,7 @@ public function testHandleErrors2(): void
172160 public function testHandleErrors3 (): void
173161 {
174162 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
175- $ whoopsMethod ->setAccessible (true );
176-
177- $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
178- $ testMethod ->setAccessible (true );
163+ $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
179164
180165 $ app = $ this ->app ->clone ([
181166 'cli ' => false ,
@@ -201,10 +186,7 @@ public function testHandleErrors3(): void
201186 public function testHandleErrorsGlobalSetting (): void
202187 {
203188 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
204- $ whoopsMethod ->setAccessible (true );
205-
206- $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
207- $ testMethod ->setAccessible (true );
189+ $ testMethod = new ReflectionMethod (App::class, 'handleErrors ' );
208190
209191 $ whoopsEnabled = $ whoopsMethod ->invoke ($ this ->app );
210192 $ whoopsDisabled = $ whoopsMethod ->invoke ($ this ->originalApp );
@@ -230,14 +212,9 @@ public function testHandleErrorsGlobalSetting(): void
230212
231213 public function testHandleHtmlErrors (): void
232214 {
233- $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
234- $ whoopsMethod ->setAccessible (true );
235-
215+ $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
236216 $ optionsMethod = new ReflectionMethod (App::class, 'optionsFromProps ' );
237- $ optionsMethod ->setAccessible (true );
238-
239- $ testMethod = new ReflectionMethod (App::class, 'handleHtmlErrors ' );
240- $ testMethod ->setAccessible (true );
217+ $ testMethod = new ReflectionMethod (App::class, 'handleHtmlErrors ' );
241218
242219 $ app = App::instance ();
243220 $ whoops = $ whoopsMethod ->invoke ($ app );
@@ -304,14 +281,9 @@ public function testHandleHtmlErrors(): void
304281
305282 public function testHandleJsonErrors (): void
306283 {
307- $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
308- $ whoopsMethod ->setAccessible (true );
309-
284+ $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
310285 $ optionsMethod = new ReflectionMethod (App::class, 'optionsFromProps ' );
311- $ optionsMethod ->setAccessible (true );
312-
313- $ testMethod = new ReflectionMethod (App::class, 'handleJsonErrors ' );
314- $ testMethod ->setAccessible (true );
286+ $ testMethod = new ReflectionMethod (App::class, 'handleJsonErrors ' );
315287
316288 $ app = App::instance ();
317289 $ whoops = $ whoopsMethod ->invoke ($ app );
@@ -381,13 +353,8 @@ public function testHandleJsonErrors(): void
381353 public function testSetUnsetWhoopsHandler (): void
382354 {
383355 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
384- $ whoopsMethod ->setAccessible (true );
385-
386- $ setMethod = new ReflectionMethod (App::class, 'setWhoopsHandler ' );
387- $ setMethod ->setAccessible (true );
388-
389- $ unsetMethod = new ReflectionMethod (App::class, 'unsetWhoopsHandler ' );
390- $ unsetMethod ->setAccessible (true );
356+ $ setMethod = new ReflectionMethod (App::class, 'setWhoopsHandler ' );
357+ $ unsetMethod = new ReflectionMethod (App::class, 'unsetWhoopsHandler ' );
391358
392359 $ app = App::instance ();
393360 $ whoops = $ whoopsMethod ->invoke ($ app );
@@ -414,7 +381,6 @@ public function testSetUnsetWhoopsHandler(): void
414381 public function testWhoops (): void
415382 {
416383 $ whoopsMethod = new ReflectionMethod (App::class, 'whoops ' );
417- $ whoopsMethod ->setAccessible (true );
418384
419385 $ app = App::instance ();
420386
0 commit comments