2424
2525/**
2626 * Centralizes small reflection lookups used by DevTools runtime metadata.
27+ *
28+ * This helper keeps command discovery code focused on command behavior instead of
29+ * raw reflection boilerplate.
2730 */
2831final class ClassReflection
2932{
3033 /**
31- * @param class-string $className
32- * @param class-string $parentClass
34+ * Detects whether a class can be instantiated as a subclass of another class.
35+ *
36+ * @param class-string $className the class being inspected
37+ * @param class-string $parentClass the required parent class or interface
38+ *
39+ * @return bool true when the class is instantiable and extends or implements the expected parent
3340 */
3441 public static function isInstantiableSubclassOf (string $ className , string $ parentClass ): bool
3542 {
@@ -39,10 +46,15 @@ public static function isInstantiableSubclassOf(string $className, string $paren
3946 }
4047
4148 /**
42- * @param class-string $className
43- * @param class-string $attributeClass
49+ * Returns the first matching attribute arguments normalized by constructor parameter name.
50+ *
51+ * Positional arguments are mapped to their constructor parameter names so callers do not
52+ * need to understand how the attribute was declared at the call site.
53+ *
54+ * @param class-string $className the class being inspected
55+ * @param class-string $attributeClass the attribute class being read
4456 *
45- * @return array<string, mixed>|null
57+ * @return array<string, mixed>|null the normalized argument map, or null when the attribute is absent
4658 */
4759 public static function getAttributeArguments (string $ className , string $ attributeClass ): ?array
4860 {
0 commit comments