if (isset($service['configurator'
])) { $definition->
setConfigurator($this->
parseCallable($service['configurator'
], 'configurator',
$id,
$file));
} if (isset($service['calls'
])) { if (!\
is_array($service['calls'
])) { throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in "%s". Check your YAML syntax.',
$id,
$file));
} foreach ($service['calls'
] as $k =>
$call) { if (!\
is_array($call) && (!\
is_string($k) || !
$call instanceof TaggedValue
)) { throw new InvalidArgumentException(sprintf('Invalid method call for service "%s": expected map or array, "%s" given in "%s".',
$id,
$call instanceof TaggedValue ? '!'.
$call->
getTag() :
get_debug_type($call),
$file));
} if (\
is_string($k)) { throw new InvalidArgumentException(sprintf('Invalid method call for service "%s", did you forgot a leading dash before "%s: ..." in "%s"?',
$id,
$k,
$file));
} if (isset($call['method'
]) && \
is_string($call['method'
])) { $method =
$call['method'
];
$args =
$call['arguments'
] ??
[];
$returnsClone =
$call['returns_clone'
] ?? false;
} else {