mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 12:38:44 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -58,7 +58,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
||||
{
|
||||
foreach ($errors as $error) {
|
||||
if (!($error instanceof FormError || $error instanceof self)) {
|
||||
throw new InvalidArgumentException(sprintf('The errors must be instances of "Symfony\Component\Form\FormError" or "%s". Got: "%s".', __CLASS__, get_debug_type($error)));
|
||||
throw new InvalidArgumentException(\sprintf('The errors must be instances of "Symfony\Component\Form\FormError" or "%s". Got: "%s".', __CLASS__, get_debug_type($error)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
||||
if ($error instanceof FormError) {
|
||||
$string .= 'ERROR: '.$error->getMessage()."\n";
|
||||
} else {
|
||||
/* @var self $error */
|
||||
/** @var self $error */
|
||||
$string .= $error->getForm()->getName().":\n";
|
||||
$string .= self::indent((string) $error);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
||||
public function getChildren(): self
|
||||
{
|
||||
if (!$this->hasChildren()) {
|
||||
throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
|
||||
throw new LogicException(\sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
|
||||
}
|
||||
|
||||
/** @var self $children */
|
||||
|
||||
Reference in New Issue
Block a user