[Form] fix phpdoc of Form::hasErrors

This commit is contained in:
Tobias Schultze 2012-08-26 21:36:01 +02:00
parent 5cb82648ad
commit d5eb4f730b
2 changed files with 3 additions and 6 deletions

View File

@ -770,18 +770,15 @@ class Form implements \IteratorAggregate, FormInterface
}
/**
* Returns whether or not there are errors.
* Returns whether there are errors associated with this form.
*
* @return Boolean true if form is bound and not valid
* @return Boolean
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3. Count
* {@link getErrors()} instead.
*/
public function hasErrors()
{
// Don't call isValid() here, as its semantics are slightly different
// Forms are not valid if their children are invalid, but
// hasErrors() returns only true if a form itself has errors
return count($this->errors) > 0;
}

View File

@ -168,7 +168,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
public function addError(FormError $error);
/**
* Returns whether the form is valid.
* Returns whether the form and all children are valid.
*
* @return Boolean
*/