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
10000
if (!$r = $container->getReflectionClass($class = $container->getDefinition($serviceId)->getClass())) {
67
+
thrownewInvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $serviceId));
68
+
}
69
+
70
+
if (!$r->hasMethod($defaultIndexMethod)) {
71
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" not found: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
72
+
}
73
+
74
+
if (!($rm = $r->getMethod($defaultIndexMethod))->isStatic()) {
75
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" should be static: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
76
+
}
77
+
78
+
if (!$rm->isPublic()) {
79
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" should be public: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
80
+
}
81
+
82
+
$key = $rm->invoke(null);
83
+
84
+
if (!\is_string($key)) {
85
+
thrownewInvalidArgumentException(sprintf('Method "%s::%s()" should return a string, got %s: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, \gettype($key), $tagName, $serviceId, $indexAttribute));
0 commit comments