From 5ed941bbff5aae337d6b58c5d990542f214d11aa Mon Sep 17 00:00:00 2001 From: David Grudl Date: Fri, 13 Oct 2023 21:47:36 +0200 Subject: [PATCH] typo --- src/PhpGenerator/Factory.php | 2 +- tests/PhpGenerator/ClassType.from.bodies.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpGenerator/Factory.php b/src/PhpGenerator/Factory.php index 5cd58cc4..9dbe007f 100644 --- a/src/PhpGenerator/Factory.php +++ b/src/PhpGenerator/Factory.php @@ -32,7 +32,7 @@ public function fromClassReflection( ): ClassLike { if ($withBodies && $from->isAnonymous()) { - throw new Nette\NotSupportedException('The $withBodies parameter cannot be used for anonymous functions.'); + throw new Nette\NotSupportedException('The $withBodies parameter cannot be used for anonymous classes.'); } $enumIface = null; diff --git a/tests/PhpGenerator/ClassType.from.bodies.phpt b/tests/PhpGenerator/ClassType.from.bodies.phpt index a98a66f0..ad09a3bc 100644 --- a/tests/PhpGenerator/ClassType.from.bodies.phpt +++ b/tests/PhpGenerator/ClassType.from.bodies.phpt @@ -23,7 +23,7 @@ Assert::exception( } }, withBodies: true), Nette\NotSupportedException::class, - 'The $withBodies parameter cannot be used for anonymous functions.', + 'The $withBodies parameter cannot be used for anonymous classes.', );