/** * Add method calls on definition. * * @param Definition $definition * @param array $service */ private function addDefinitionCallsFromArray(Definition &$definition, array $service) { if ($this->isArrayServiceHasCalls($service)) { foreach ($service['calls'] as $method => $parameters) { if (is_int($method)) { $definition->addMethodCall($parameters); continue; } $definition->addMethodCall($method, $this->normalizeParameters($service['calls'], $method)); } } }