File tree 4 files changed +6
-6
lines changed 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ public function __construct(
194
194
$ traceReflector ->setValue ($ e , $ trace );
195
195
$ e ->file = $ file ?? $ e ->file ;
196
196
$ e ->line = $ line ?? $ e ->line ;
197
- }, null , new class () extends \Exception {
197
+ }, null , new class extends \Exception {
198
198
});
199
199
}
200
200
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class CliErrorRenderer implements ErrorRendererInterface
26
26
public function render (\Throwable $ exception ): FlattenException
27
27
{
28
28
$ cloner = new VarCloner ();
29
- $ dumper = new class () extends CliDumper {
29
+ $ dumper = new class extends CliDumper {
30
30
protected function supportsColors (): bool
31
31
{
32
32
$ outputStream = $ this ->outputStream ;
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ public function testHandleError()
333
333
334
334
public function testHandleErrorWithAnonymousClass ()
335
335
{
336
- $ anonymousObject = new class () extends \stdClass {
336
+ $ anonymousObject = new class extends \stdClass {
337
337
};
338
338
339
339
$ handler = ErrorHandler::register ();
@@ -422,7 +422,7 @@ public static function handleExceptionProvider(): array
422
422
['Uncaught Exception: foo ' , new \Exception ('foo ' )],
423
423
['Uncaught Exception: foo ' , new class ('foo ' ) extends \RuntimeException {
424
424
}],
425
- ['Uncaught Exception: foo stdClass@anonymous bar ' , new \RuntimeException ('foo ' .(new class () extends \stdClass {
425
+ ['Uncaught Exception: foo stdClass@anonymous bar ' , new \RuntimeException ('foo ' .(new class extends \stdClass {
426
426
})::class.' bar ' )],
427
427
['Uncaught Error: bar ' , new \Error ('bar ' )],
428
428
['Uncaught ccc ' , new \ErrorException ('ccc ' )],
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ public static function stringAndIntDataProvider(): array
991D
div>
245
245
246
246
public function testAnonymousClass ()
247
247
{
248
- $ flattened = FlattenException::createFromThrowable (new class () extends \RuntimeException {
248
+ $ flattened = FlattenException::createFromThrowable (new class extends \RuntimeException {
249
249
});
250
250
251
251
$ this ->assertSame ('RuntimeException@anonymous ' , $ flattened ->getClass ());
@@ -255,7 +255,7 @@ public function testAnonymousClass()
255
255
256
256
$ this ->assertSame ('Symfony\Component\HttpKernel\Exception\NotFoundHttpException@anonymous ' , $ flattened ->getClass ());
257
257
258
- $ flattened = FlattenException::createFromThrowable (new \Exception (\sprintf ('Class "%s" blah. ' , (new class () extends \RuntimeException {
258
+ $ flattened = FlattenException::createFromThrowable (new \Exception (\sprintf ('Class "%s" blah. ' , (new class extends \RuntimeException {
259
259
})::class)));
260
260
261
261
$ this ->assertSame ('Class "RuntimeException@anonymous" blah. ' , $ flattened ->getMessage ());
You can’t perform that action at this time.
0 commit comments