mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -46,7 +46,7 @@ abstract class Descriptor implements DescriptorInterface
|
||||
null === $object => $this->describeDefaults($options),
|
||||
$object instanceof ResolvedFormTypeInterface => $this->describeResolvedFormType($object, $options),
|
||||
$object instanceof OptionsResolver => $this->describeOption($object, $options),
|
||||
default => throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))),
|
||||
default => throw new \InvalidArgumentException(\sprintf('Object of type "%s" is not describable.', get_debug_type($object))),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class TextDescriptor extends Descriptor
|
||||
'extension' => 'Extension options',
|
||||
], $formOptions);
|
||||
|
||||
$this->output->title(sprintf('%s (Block prefix: "%s")', $resolvedFormType->getInnerType()::class, $resolvedFormType->getInnerType()->getBlockPrefix()));
|
||||
$this->output->title(\sprintf('%s (Block prefix: "%s")', $resolvedFormType->getInnerType()::class, $resolvedFormType->getInnerType()->getBlockPrefix()));
|
||||
|
||||
if ($formOptions) {
|
||||
$this->output->table($tableHeaders, $this->buildTableRows($tableHeaders, $formOptions));
|
||||
@@ -134,7 +134,7 @@ class TextDescriptor extends Descriptor
|
||||
}
|
||||
array_pop($rows);
|
||||
|
||||
$this->output->title(sprintf('%s (%s)', $options['type']::class, $options['option']));
|
||||
$this->output->title(\sprintf('%s (%s)', $options['type']::class, $options['option']));
|
||||
$this->output->table([], $rows);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class TextDescriptor extends Descriptor
|
||||
} else {
|
||||
$options[$group][] = null;
|
||||
}
|
||||
$options[$group][] = sprintf('<info>%s</info>', (new \ReflectionClass($class))->getShortName());
|
||||
$options[$group][] = \sprintf('<info>%s</info>', (new \ReflectionClass($class))->getShortName());
|
||||
$options[$group][] = new TableSeparator();
|
||||
|
||||
sort($opt);
|
||||
@@ -199,7 +199,7 @@ class TextDescriptor extends Descriptor
|
||||
return $text;
|
||||
}
|
||||
|
||||
return sprintf('<href=%s>%s</>', $fileLink, $text);
|
||||
return \sprintf('<href=%s>%s</>', $fileLink, $text);
|
||||
}
|
||||
|
||||
private function getFileLink(string $class): string
|
||||
|
||||
Reference in New Issue
Block a user