@@ -449,7 +449,7 @@ public function testDynamicAccess(): void
449449 17 ,
450450 ],
451451 [
452- 'Cannot fetch constant from ClassConstantDynamicAccess\Foo with a non-stringable type object. ' ,
452+ 'Class constant name for ClassConstantDynamicAccess\Foo must be a string, but object was given . ' ,
453453 19 ,
454454 ],
455455 [
@@ -494,51 +494,51 @@ public function testStringableDynamicAccess(): void
494494
495495 $ this ->analyse ([__DIR__ . '/data/dynamic-constant-stringable-access.php ' ], [
496496 [
497- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type mixed. ' ,
497+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but mixed was given . ' ,
498498 14 ,
499499 ],
500500 [
501- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type string|null. ' ,
501+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but string|null was given . ' ,
502502 15 ,
503503 ],
504504 [
505- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type Stringable|null. ' ,
505+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but Stringable|null was given . ' ,
506506 16 ,
507507 ],
508508 [
509- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type int. ' ,
509+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but int was given . ' ,
510510 17 ,
511511 ],
512512 [
513- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type int|null. ' ,
513+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but int|null was given . ' ,
514514 18 ,
515515 ],
516516 [
517- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type DateTime|string. ' ,
517+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but DateTime|string was given . ' ,
518518 19 ,
519519 ],
520520 [
521- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type 1111. ' ,
521+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but 1111 was given . ' ,
522522 20 ,
523523 ],
524524 [
525- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type Stringable. ' ,
525+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but Stringable was given . ' ,
526526 22 ,
527527 ],
528528 [
529- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Foo with a non-stringable type mixed. ' ,
529+ 'Class constant name for ClassConstantDynamicStringableAccess\Foo must be a string, but mixed was given . ' ,
530530 32 ,
531531 ],
532532 [
533- 'Cannot fetch constant from ClassConstantDynamicStringableAccess\Bar with a non-stringable type mixed. ' ,
533+ 'Class constant name for ClassConstantDynamicStringableAccess\Bar must be a string, but mixed was given . ' ,
534534 33 ,
535535 ],
536536 [
537- 'Cannot fetch constant from DateTime|DateTimeImmutable with a non-stringable type mixed. ' ,
537+ 'Class constant name for DateTime|DateTimeImmutable must be a string, but mixed was given . ' ,
538538 38 ,
539539 ],
540540 [
541- 'Cannot fetch constant from object with a non-stringable type mixed. ' ,
541+ 'Class constant name for object must be a string, but mixed was given . ' ,
542542 39 ,
543543 ],
544544 ]);
0 commit comments