mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -58,11 +58,11 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
}
|
||||
|
||||
if ($argumentType) {
|
||||
$message .= sprintf('of type "%s" ', $argumentType);
|
||||
$message .= \sprintf('of type "%s" ', $argumentType);
|
||||
}
|
||||
|
||||
if ($argumentName) {
|
||||
$message .= sprintf('named "%s" ', $argumentName);
|
||||
$message .= \sprintf('named "%s" ', $argumentName);
|
||||
}
|
||||
|
||||
if (BoundArgument::DEFAULTS_BINDING === $bindingType) {
|
||||
@@ -70,17 +70,17 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
} elseif (BoundArgument::INSTANCEOF_BINDING === $bindingType) {
|
||||
$message .= 'under "_instanceof"';
|
||||
} else {
|
||||
$message .= sprintf('for service "%s"', $serviceId);
|
||||
$message .= \sprintf('for service "%s"', $serviceId);
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
$message .= sprintf(' in file "%s"', $file);
|
||||
$message .= \sprintf(' in file "%s"', $file);
|
||||
}
|
||||
|
||||
$message = sprintf('A binding is configured for an argument %s, but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.', $message);
|
||||
$message = \sprintf('A binding is configured for an argument %s, but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.', $message);
|
||||
|
||||
if ($this->errorMessages) {
|
||||
$message .= sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : '');
|
||||
$message .= \sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : '');
|
||||
}
|
||||
foreach ($this->errorMessages as $m) {
|
||||
$message .= "\n - ".$m;
|
||||
@@ -141,7 +141,7 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
}
|
||||
|
||||
if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition && !$bindingValue instanceof TaggedIteratorArgument && !$bindingValue instanceof ServiceLocatorArgument) {
|
||||
throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected "%s", "%s", "%s", "%s" or null, "%s" given.', $key, $this->currentId, Reference::class, Definition::class, TaggedIteratorArgument::class, ServiceLocatorArgument::class, get_debug_type($bindingValue)));
|
||||
throw new InvalidArgumentException(\sprintf('Invalid value for binding key "%s" for service "%s": expected "%s", "%s", "%s", "%s" or null, "%s" given.', $key, $this->currentId, Reference::class, Definition::class, TaggedIteratorArgument::class, ServiceLocatorArgument::class, get_debug_type($bindingValue)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,13 +225,13 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
if (isset($bindingNames[$name]) || isset($bindingNames[$parsedName]) || isset($bindingNames[$parameter->name])) {
|
||||
$bindingKey = array_search($binding, $bindings, true);
|
||||
$argumentType = substr($bindingKey, 0, strpos($bindingKey, ' '));
|
||||
$this->errorMessages[] = sprintf('Did you forget to add the type "%s" to argument "$%s" of method "%s::%s()"?', $argumentType, $parameter->name, $reflectionMethod->class, $reflectionMethod->name);
|
||||
$this->errorMessages[] = \sprintf('Did you forget to add the type "%s" to argument "$%s" of method "%s::%s()"?', $argumentType, $parameter->name, $reflectionMethod->class, $reflectionMethod->name);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($names as $key => $name) {
|
||||
if (\array_key_exists($name, $arguments) && (0 === $key || \array_key_exists($key - 1, $arguments))) {
|
||||
if (!array_key_exists($key, $arguments)) {
|
||||
if (!\array_key_exists($key, $arguments)) {
|
||||
$arguments[$key] = $arguments[$name];
|
||||
}
|
||||
unset($arguments[$name]);
|
||||
|
||||
Reference in New Issue
Block a user