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
Copy file name to clipboardExpand all lines: Argument/TaggedIteratorArgument.php
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,21 @@ class TaggedIteratorArgument extends IteratorArgument
22
22
private$indexAttribute;
23
23
private$defaultIndexMethod;
24
24
25
+
/**
26
+
* TaggedIteratorArgument constructor.
27
+
*
28
+
* @param string $tag The name of the tag identifying the target services
29
+
* @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection
30
+
* @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute
if (array_key_exists('namespace', $service) && !array_key_exists('resource', $service)) {
548
+
if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) {
549
549
thrownewInvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in %s. Check your YAML syntax.', $id, $file));
550
550
}
551
551
552
-
if (array_key_exists('resource', $service)) {
552
+
if (\array_key_exists('resource', $service)) {
553
553
if (!\is_string($service['resource'])) {
554
554
thrownewInvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file));
0 commit comments