diff --git a/HtmlExtension.php b/HtmlExtension.php
index 4231c6a..d8a6c00 100644
--- a/HtmlExtension.php
+++ b/HtmlExtension.php
@@ -97,7 +97,7 @@ public static function htmlClasses(...$args): string
} elseif (\is_array($arg)) {
foreach ($arg as $class => $condition) {
if (!\is_string($class)) {
- throw new RuntimeError(\sprintf('The html_classes function argument %d (key %d) should be a string, got "%s".', $i, $class, get_debug_type($class)));
+ throw new RuntimeError(\sprintf('The "html_classes" function argument %d (key %d) should be a string, got "%s".', $i, $class, get_debug_type($class)));
}
if (!$condition) {
continue;
@@ -105,7 +105,7 @@ public static function htmlClasses(...$args): string
$classes[] = $class;
}
} else {
- throw new RuntimeError(\sprintf('The html_classes function argument %d should be either a string or an array, got "%s".', $i, get_debug_type($arg)));
+ throw new RuntimeError(\sprintf('The "html_classes" function argument %d should be either a string or an array, got "%s".', $i, get_debug_type($arg)));
}
}
diff --git a/Tests/Fixtures/html_classes_with_unsupported_arg.test b/Tests/Fixtures/html_classes_with_unsupported_arg.test
index 85faed6..21ca373 100644
--- a/Tests/Fixtures/html_classes_with_unsupported_arg.test
+++ b/Tests/Fixtures/html_classes_with_unsupported_arg.test
@@ -5,4 +5,4 @@
--DATA--
return []
--EXCEPTION--
-Twig\Error\RuntimeError: The html_classes function argument 0 should be either a string or an array, got "boolean" in "index.twig" at line 2.
+Twig\Error\RuntimeError: The "html_classes" function argument 0 should be either a string or an array, got "bool" in "index.twig" at line 2.
diff --git a/Tests/Fixtures/html_classes_with_unsupported_key.test b/Tests/Fixtures/html_classes_with_unsupported_key.test
index b74748c..708cb25 100644
--- a/Tests/Fixtures/html_classes_with_unsupported_key.test
+++ b/Tests/Fixtures/html_classes_with_unsupported_key.test
@@ -5,4 +5,4 @@
--DATA--
return []
--EXCEPTION--
-Twig\Error\RuntimeError: The html_classes function argument 0 (key 0) should be a string, got "integer" in "index.twig" at line 2.
+Twig\Error\RuntimeError: The "html_classes" function argument 0 (key 0) should be a string, got "int" in "index.twig" at line 2.