You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (($self->interactiveQuestion = InteractiveQuestion::tryFrom($member, $self->name)) && $isOptional) {
98
+
thrownewLogicException(\sprintf('The %s "$%s" of "%s" cannot be both interactive and optional.', $reflection->getMemberName(), $self->name, $reflection->getSourceName()));
99
+
}
100
+
95
101
return$self;
96
102
}
97
103
@@ -118,4 +124,9 @@ public function resolveValue(InputInterface $input): mixed
if (!$self = ($method->getAttributes(self::class)[0] ?? null)?->newInstance()) {
28
+
returnnull;
29
+
}
30
+
31
+
if (!$method->isPublic() || $method->isStatic()) {
32
+
thrownewLogicException(\sprintf('The interactive method "%s::%s()" must be public and non-static.', $method->getDeclaringClass()->getName(), $method->getName()));
33
+
}
34
+
35
+
if ('__invoke' === $method->getName()) {
36
+
thrownewLogicException(\sprintf('The "%s::__invoke()" method cannot be used as an interactive method.', $method->getDeclaringClass()->getName()));
0 commit comments