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 (!$r = $container->getReflectionClass($class = $container->getDefinition($serviceId)->getClass())) {
71
+
thrownewInvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $serviceId));
72
+
}
73
+
74
+
if (!$r->hasMethod($defaultIndexMethod)) {
75
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" not found: Tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
76
+
}
77
+
78
+
if (!($rm = $r->getMethod($defaultIndexMethod))->isStatic()) {
79
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" used for service "%s" must be static.', $class, $defaultIndexMethod, $serviceId));
80
+
}
81
+
82
+
if (!$rm->isPublic()) {
83
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" used for service "%s" must be public.', $class, $defaultIndexMethod, $serviceId));
84
+
}
85
+
86
+
$key = $rm->invoke(null);
87
+
88
+
if (!\is_string($key)) {
89
+
thrownewLogicException(sprintf('Return value of method "%s::%s()" used for service "%s" must be of type string.', $class, $defaultIndexMethod, $serviceId));
0 commit comments